简体   繁体   中英

Visual Studio Msbuild Task Project Dependencies

I decided to rephrase my problem, as it seems it was not quit as clear as it should have been

I want to define a project dependency (let's call it ProjectB ) which is only used for build order and doesn't pull in an assembly reference to the current project (let's call it ProjectA ). Manual modification of the build order via visual studio is not an option as the build order should be set from a nuget package, which as far as I know can only modify the msbuild file of the current project and not the solution file itself.

The reason behind this is, I want to create a source file which content is the result of processing the ProjectB executable. Also ProjectB is .NET 4.5 and ProjectA is .NET 2.0, so a direct reference is not possible anyhow.

I tried it with the msbuild ProjectReference tag, but this would add it to the assembly references the compiler receives (and throws an error as the versions are not compatible).

VS Version: 2012, no need for 2010 or lower compatibility.

You say that Project B executable should not have a dependency to Project A's DLL, but that is a function of the Project B implementation, not of the assembly reference. I suggest you rephrase your question. Add Project A as a Project B referenced assembly so that you create the desired build sequence, then describe the problem that results so that it can be addressed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM