4
votes

I'm using Visual Studio 2012 and TFS and I have an issue with builds. I currently have a 2 projects solution (One with the main project, the other with only the resources files) But only the main project has a Publish Profile, the other one doesn't have one it's just a dependency to the first one and need only to be compiled.

But when i launch the build i got this error :

C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets (4435): The value for PublishProfile is set to 'Dev', expected to find the file at 'e:\Builds\6\DEV.MyProject\Sources\MyProject.Resources\Properties\PublishProfiles\Dev.pubxml' but it could not be found. C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets (4442): PublishProfile(Dev) is set. But the $(WebPublishMethod) does not have a valid value. Current Value is "". C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\Web\Microsoft.Web.Publishing.targets (4449): Target ValidatePublishProfileSettings Failed

So is there a way through MSBuild Arguments that i can publish my app, by only compiling one project and then compiling + publishing the second one ?

Thanks,

1

1 Answers

1
votes

The problem is solved since a bit of time but didn't remember to answer :D.

So the problem was : My Resources Project (To get a better separation of dlls) won't compile in MSBuild because of a non-existent Publish Profile. It's all because of the type of project i created. The project was a ASP.NET MVC Application so MSBuild tried to Compile AND Publish it. Which was impossible because there was no publish profile and it wasn't design to be.

I changed my project from being a ASP Application to a Class Library and it worked perfectly fine.