Last post Nov 23, 2015 08:48 PM by viktorr
Nov 22, 2015 08:18 PM|viktorr|LINK
I have been struggling to get ASP.NET 5 working with Visual Studio 2015 RC1.
The first time when I installed RC1, my template to create web applications was gone (Web tools options was checked).
I have tried every possible option I thought of or found with google, but I could not get the template back (even with a restore of VS).
Out of frustration I uninstalled everything that had a relation to Visual Studio including registry settings.
I have reinstalled Visual Studio Enterprise 2015 and installed RC1 again and to my relieve the Web Application template was there.
But after executing the template the output was not correct, all dependencies where beta5.
Here is a fragment from the project.json:
"web": "Microsoft.AspNet.Hosting --config hosting.ini"
The above looks deprecated, it should use Kestrel instead of IIS.
So I thought lets try to generate asp.net 5 with Yeoman and run this directly with dmx and this worked like a charm.
Then I tried to open that generated code with Visual Studio 2015 and that was no problem.
After adjusting some settings to run with Visual Studio, I've got the following message:
Could not load type 'Microsoft.Dnx.Host.Clr.EntryPoint' from assembly 'Microsoft.Dnx.Host.Clr, Version=220.127.116.11, Culture=neutral, PublicKeyToken=adb9793829ddae60'.
Does anybody know how I can fix my ASP.Net web application Tempate, so it generates the correct content for RC1 so it runs without adjustments?
If not, is there an easy way to get the Yeoman output to work with Visual Studio 2015?
Nov 22, 2015 08:29 PM|maherjendoubi|LINK
Let's please verify some points. Would you please open a cmd console and post here the result of dnvm list?
Then please do : where dnx, if you see some beta 5 stuff in %userprofile%\.dnx\runtimes\ you should delete it.
So, first let's try to fix Visual Studio 2015 issue first, then I will assist you for Yeoman if you want.
Nov 23, 2015 06:33 PM|viktorr|LINK
Thank you for your reaction.
If we can fix the Visual Studio issue, that would be great.
Here is the output of dnvm:
Active Version Runtime Architecture OperatingSystem Alias
------ ------- ------- ------------ --------------- -----
1.0.0-rc1-final clr x64 win
1.0.0-rc1-final clr x86 win
1.0.0-rc1-final coreclr x64 win
1.0.0-rc1-final coreclr x86 win
* 1.0.0-rc2-16177 clr x86 win default
When I generate the Visual Studio web project then the beta5 stuff is added automatically.
So I've removed the beta5 runtime from the list, but it will come back on template generation.
When you let Visual Studio 2015 generate a project, it is now possible to export this template.
My empty web project template can be downloaded here: http://www.filedropper.com/webapplication4
So I though if you could just export a working template for an empty and web project, this should work.
Nov 23, 2015 07:22 PM|Radomir|LINK
Project templates are here:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\WebTemplates\DNX\CSharp\1033
(several subfolders for different types of projects.. ie EmptyWeb for "Empty" template etc..)
Nov 23, 2015 07:47 PM|viktorr|LINK
Somehow these templates are not replaced when I installed Visual Studio 2015 RC1.
I have tried the fix option, complete reinstall and still I have old templates.
But I could not find similar posts related to my problem, so it must be something on my machine that caused this.
Can I find the updated templates on Github or elsewhere?
Or perhaps somebody can share this directory, so I can replace the templates?
Nov 23, 2015 08:05 PM|Radomir|LINK
Can't guarantee it'll work but worth a try..
Nov 23, 2015 08:48 PM|viktorr|LINK
Thanks for posting the bits Radomir.
The generation works great, the correct version is available in the json files.
When I initially build the solution, I get errors.
It seems that the project properties still point to the beta5 runtime, but now I have the option to switch to RC1.
Now it works!!
Thanks for all the help.