TheSwamp
Code Red => .NET => Topic started by: Andrey Bushman on March 04, 2015, 02:43:26 PM
-
MSVS 2013 Update 4.
From MSDN (https://msdn.microsoft.com/en-us/library/ms164309.aspx):
MSBuildProjectName - the file name of the project file without the file name extension; for example, MyApp.
My code:
<RootNamespace>MyCompany.CAD.Extensions.$(MSBuildProjectName)</RootNamespace>
But I see the project name with the file extension (in the project settings, the "Application" tab -> "Default namespace" field) :
MyCompany.CAD.Extensions.AutoCAD_some_extension.csproj
Why does it happen? How can I fix it?
-
In a Visual Studio Template I just use $safeprojectname$ in a CSPROJ file. Sometimes there are subtly different behaviours between CSPROJ and MSBUILD but there are also a different set of rules for Visual Studio templates. See https://msdn.microsoft.com/en-us/library/eehb4faa.aspx
Another handy thing is <CustomParameters> https://msdn.microsoft.com/en-us/library/8wba5h42.aspx