How do I target a specific .NET project within a Solution using MSBuild from VS2010?

后端 未结 3 2183
Happy的楠姐
Happy的楠姐 2020-12-14 09:39

I have an MSBuild command line that can build an entire solution. It looks something like this:

msbuild SomeSolution.sln /p:Configuration:CustomDebug;Platform=Our

相关标签:
3条回答
  • 2020-12-14 10:28

    You can use the following commandline for building your project using msbuild from commandline

    msbuild Solution.sln /p:Configuration=Release;Platform=x86 /t:ProjectName:Rebuild
    
    0 讨论(0)
  • 2020-12-14 10:32

    Invoke MSBuild on the project file instead of the solution file (ref.msbuild /?)

    msbuild SomeDotNetProject\SomeDotNetProject.csproj /p:Configuration:CustomDebug;Platform=OurPlatform /nodeReuse:false /maxcpucount:4 /t:Build
    
    0 讨论(0)
  • 2020-12-14 10:36

    You'll need to specify any solution folders in the Visual Studio solution file, and replace any "." in the project name with "_":

    msbuild SomeSolution.sln /p:Configuration:CustomDebug;Platform=OurPlatform /t:Folder\Project_Name

    For example, if you have a project in the solution folder "Deploy" named "MyApplication.Deployment.csproj", you'll need

    msbuild SomeSolution.sln /p:Configuration:CustomDebug;Platform=OurPlatform /t:Deploy\MyApplication_Deployment

    Incidentially this is a solution folder, as displayed in Visual Studio, not a file system folder: those are ignored.

    0 讨论(0)
提交回复
热议问题