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

后端 未结 3 2196
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: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.

提交回复
热议问题