Open CHi-yas opened 3 years ago
I couldn't figure out the best area label to add to this issue. If you have write-permissions please help me learn by adding exactly one area label.
Microsoft has approved this problem. See: https://developercommunity2.visualstudio.com/t/dotnet-add-project-wrong-configuration/1410504?from=email&space=61&entry=problem
I tried dotnet new classlib, dotnet new sln, dotnet sln test.sln add test.csproj and didn't see this behavior. Is there anything special in your csproj file that might indicate it only supports debug config?
Hi,
I have also reported this behavior in the Microsoft forum. https://developercommunity.visualstudio.com/t/dotnet-add-project-wrong-configuration/1410504?from=email
They could reproduce this behavior and I have also added more detailed information.
Von: Marc Paine @.> Gesendet: Mittwoch, 26. Mai 2021 23:20 An: dotnet/sdk @.> Cc: Christian Heinz @.>; Author @.> Betreff: Re: [dotnet/sdk] dotnet add project wrong configuration (#17243)
I tried dotnet new classlib, dotnet new sln, dotnet sln test.sln add test.csproj and didn't see this behavior. Is there anything special in your csproj file that might indicate it only supports debug config?
- You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fdotnet%2Fsdk%2Fissues%2F17243%23issuecomment-849126764&data=04%7C01%7Cchristian.heinz%40yaskawa.eu.com%7C33dd01467f294d4abe5708d9208c141a%7C7323b23de4294dc499b5726501252240%7C0%7C0%7C637576608281536924%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ef1LuQl9XjePAwxTaPKLGLdIbMJaEi13%2FWbefMG5%2FUE%3D&reserved=0, or unsubscribehttps://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAT3YBJH66FN37SNORAC4WNTTPVQZRANCNFSM43WJ4SGA&data=04%7C01%7Cchristian.heinz%40yaskawa.eu.com%7C33dd01467f294d4abe5708d9208c141a%7C7323b23de4294dc499b5726501252240%7C0%7C0%7C637576608281536924%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=mmH%2BGtQZsxioMVkaPQ5jQpavyLvyfFNzYqYa5I2Ie2E%3D&reserved=0.
CONFIDENTIALITY: This e-mail and any attachments are confidential and may also be privileged. If you are not the named recipient, please notify the sender immediately and do not disclose the contents to another person, use it for any purpose, or store or copy the information in any medium.
Some time ago I evaluated the usage of the .NET CLI. Which is really simple and easy to use. I used it to add several projects to a existing solution file. After building my solution on the build server i had a strange behavior. Even for release configuration the debug configuration was build. After some investigation I found out the useage of the .NET CLI caused the issue.
I reproduced it with an empty solution where I just wanted to add one project.
Empty solution:
After adding the project manual with Visual Studio:
Everything looks fine a configuration for Debug and Release is added.
If i try the same with the .NET Core-CLI:
dotnet sln ClassLibrary1.sln add ClassLibrary1/ClassLibrary1.csproj
The result is a little bit different from my expected result:
The project was succesfully added but all configurations point to Debug. That is the explaination why also in Release configuration Debug is build.
I could reproduce this behavior on several machines. Also different colleagues can reproduce this behavior.
The .Net version is 5.0.202