Skip to content
This repository has been archived by the owner on Dec 18, 2017. It is now read-only.

Is DNX compatible with MSBuild already? #2207

Closed
flyandi opened this issue Jul 8, 2015 · 7 comments
Closed

Is DNX compatible with MSBuild already? #2207

flyandi opened this issue Jul 8, 2015 · 7 comments

Comments

@flyandi
Copy link

flyandi commented Jul 8, 2015

I am trying to get a DNX project compiled with MSBuild, however the build fails with the following error:

error MSB4019: The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v14.0\DNX\Microsoft.DNX.Props" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.

I followed every instructions but I can't get those files downloaded to the proper directory. Anyone has an hint?

@analogrelay
Copy link
Contributor

To clarify, are you running msbuild on an .xproj file located next to a project.json? If so, I believe that should work, but I'm not 100% clear on that stuff. Adding some VS Web Tooling folks (+ @PradeepKadubandi @BillHiebert).

If you have the Web Development Tools installed in VS 2015, those targets files should have been dropped there properly.

@davidfowl
Copy link
Member

Ye it sounds like a broken vs install or an older build of vs opening a newer project

@flyandi
Copy link
Author

flyandi commented Jul 8, 2015

Yes, that's correct.

Running msbuild on an .xproj file with project.json.

I installed dnvm and installed the dnx runtime environment which was placed into my user profile. So the question is now. The project is marked with:

"frameworks": {
"dnx451": { }
},

and most dependencies are marked to 1.0.0-beta4 which is installed (via dnvm).

However msbuild doesn't have any of the VisualStudio files installed. Are they suppose to be installed automatically with "msbuild 14.0" or do I need to install another package?

@analogrelay
Copy link
Contributor

Right now the DNX MSBuild targets are only installed with Visual Studio 2015 (specifically the Web Development Tools component).

@analogrelay
Copy link
Contributor

Is there a reason you are specifically restricted to using MSBuild here? The MSBuild targets basically just execute dnu build, they are really just designed for Visual Studio integration. For command-line builds, we suggest you use dnu directly.

@sulhome
Copy link

sulhome commented Oct 26, 2015

@flyandi are you using TFS 2013 or 2015?

@dazinator
Copy link

dazinator commented Apr 15, 2016

I know this is a little old now, but I think it's still relevant.

Is there a reason you are specifically restricted to using MSBuild here? The MSBuild targets basically just execute dnu build

For projects that contain Typescript, the project has a setting "Compile TypeScript on build". This is run by MSBuild, but not by Dnu (or presumably, the new dotnet cli either).

So for this reason (and potentially other actions that are only actioned by MSBuild) it's useful to be able to do an MSBuild of the solution. As a side issue, unfortunately, if setting up a build server, installing the MSBuild tools is not enough, you also have to install Visual Studio to get the required targets. It would be much better if there was a seperate install to install the necessary build targets, without having to install VS in my opinion!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants