NOTE Read: https://github.com/aspnet/Announcements/issues/150
With the move to Microsoft.AspNetCore I can't seem to get the packages Microsoft.AspNetCore.Mvc or Microsoft.AspNetCore.Mvc.Razor for dnxcore50 from the Nuget feeds.
When I add a dependency on
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
or
"Microsoft.AspNetCore.Mvc.Razor": "1.0.0-*",
they are not found when running dnx-coreclr-win-x64.1.0.0-rc2-16357
The feeds I tried are the old ones still used in aspnet/Mvc https://github.com/aspnet/Mvc/blob/dev/NuGet.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="AspNetVNext" value="https://www.myget.org/F/aspnetcidev/api/v3/index.json" />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
But also the one mentioned in https://github.com/aspnet/Announcements/issues/149
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="NuGet.org" value="https://api.nuget.org/v3/index.json" />
<add key="dotnet-core" value="https://www.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="dotnet-cli" value="https://www.myget.org/F/dotnet-cli/api/v3/index.json" />
</packageSources>
</configuration>
But both seem to restore with some NotFound messages. And a dnu build or dotnet compile spits out
error NU1002: The dependency Microsoft.AspNetCore.Mvc.Razor 1.0.0-rc2-16991 in project ... does not support framework DNXCore,Version=v5.0.
So the project won't compile/run.
I removed all the .dnx\packages and .nuget\packages and that does not help.
Any idea if or when the rename is finished, and what feeds are the correct feeds to use?
I just did dnu restore dnu build and dotnet restore dotnet compile on https://github.com/aspnet/Mvc/tree/dev/samples/TagHelperSample.Web
for dnx-coreclr-win-x64.1.0.0-rc2-16357
and it had the same (and more) dependency errors so probably the rename is ongoing, please let me/us know when it's done. Or can we just watch the announcement repo to get a message when it's done?
Same here. I had to remove dnxcore50 from my projects.
I am also seeing the same issue. Looks like anything AspNetCore as all of these have the same issue for me:
"Microsoft.AspNetCore.Mvc": "1.0.0-_",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-_",
"Microsoft.AspNetCore.Mvc.Abstractions": "1.0.0-*",
This is so confusing. All these code samples referencing AspNetCore and yet I can't seem to find the packages anywhere? Am I going mad?
All I want is to regularly update to the latest version and update my code accordingly.
I am in the same boat, I am trying to keep up with the changes so that I am ready to go when they RTM and it has been impossible to even get anything to compile including examples for the last couple of weeks.
@GarageWeb As I dug through some of the samples it became clear to me that many of them _are just to show what the code will look like after refactoring_. That means the authors don't intend some of these files to work.
After spending a couple of hours working with rc2-* packages, I can only suggest that you stick with RC1-final for now, and keep an eye on github.com/aspnet/announcements for breaking changes coming up to RC2.
From what I've seen, I wouldn't expect a RC2 release for months.
Phil
@replete Thanks for the information. I did see a talk that Fowler was giving stating that they expected to get RC2 out within a month and that was about 2 weeks ago. I have no idea if it will really happen or not, but I hope it does. Thanks again and good luck with your projects.
@replete Looks like you're right. The code and documentation are completely out of sync it would appear. RC2 Looks to be a huge change. Hopefully we'll get some new documentation and announcements soon - I would love to see some timelines
This could be the problem: https://github.com/aspnet/Announcements/issues/150
@GarageWeb Nice find - I was assuming RC2 was final but it looks like RC 2 is currently baking in "dev". Good stuff
set DNX_UNSTABLE_FEED=https://www.myget.org/F/aspnetcidev/api/v3/index.json
dnvm upgrade -u
Try that
@davidfowl I gave this a shot and it errors with "Unable to find any runtime packages on the feed" Thanks
@GarageWeb Try the v2 feed, that worked for me : https://www.myget.org/F/aspnetcidev/api/v2
@salerth Thanks. I actually tried this earlier and it did upgrade, but it still has the same issues.
"Microsoft.AspNetCore.Mvc" does not support framework DNXCore,Version=v5.0
I also tried with the volatile feed last week, but that didnt help either. It's not all but linking to Mvc does not compile.
Should we use another moniker maybe? Not dnxcore50?
Oops I missed:
set DNX_UNSTABLE_FEED=https://www.myget.org/F/aspnetcidev/api/v2/
dnvm upgrade -u
V2 not v3 thanks @GarageWeb!
@IRooc after the upgrade close and reopen the solution and it should work.
@davidfowl I have run the upgrade and closed and reopened the solution, same error. Anything AspNetCore.Mvc fails to compile.
@GarageWeb can you do me a favor and make a sample application with the minimal set of dependencies, put it on github so I can try it? Also, please provide a NuGet.config in the sample and check in the lock file so I can see what versions got resolved.
@davidfowl will do.
@davidfowl Well I am glad you asked me to go through that exercise. It turns out that my global.json file had a reference to an older sdk. I updated it to:
"sdk": {
"version": "1.0.0-rc2-16541"
}
and it worked! Thanks
@davidfowl
when I create this project.json:
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},
"dependencies": {
"Microsoft.AspNetCore.Mvc.Razor": "1.0.0-rc2-17085",
"NETStandard.Library": "1.0.0-rc2-23704"
},
"frameworks": {
"dnxcore50": { }
}
}
which is basically the dotnet new with the extra AspNetCore.Mvc.Razor dependency, the dotnet restore and dnu restore both fail for runtime 1.0.0-rc2-16541 coreclr x64 win
dnu restore says
System.ArgumentException: More than one runtime.json file has declared imports for 'win7-x86'
Parameter name: runtimeName
at Microsoft.Dnx.Tooling.RestoreCommand.FindRuntimeDependencies(String runtimeName, List`1 runtimeFiles, Dictionary`2 effectiveRuntimeSpecs, HashSet`1 allRuntimeNames, Func`2 circularImport)
at Microsoft.Dnx.Tooling.RestoreCommand.FindRuntimeDependencies(String runtimeName, List`1 runtimeFiles, Dictionary`2 effectiveRuntimeSpecs, HashSet`1 allRuntimeNames)
at Microsoft.Dnx.Tooling.RestoreCommand.<RestoreForProject>d__69.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dnx.Tooling.RestoreCommand.<>c__DisplayClass68_0.<<Execute>b__2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dnx.Tooling.RestoreCommand.<Execute>d__68.MoveNext()
----------
and dotnet restore says
info : Running restore with 16 concurrent jobs.
info : Restoring packages for C:\Rc\Projects\Test\project.json...
info : Installing System.Runtime 4.0.21-rc2-23811.
info : Installing System.Linq 4.0.1-rc2-23811.
info : Installing System.Dynamic.Runtime 4.0.11-rc2-23811.
info : Installing System.Reflection 4.1.0-rc2-23811.
info : Installing System.IO.FileSystem 4.0.1-rc2-23811.
info : NotFound https://api.nuget.org/v3-flatcontainer/system.threading.tasks.extensions/index.json 457ms
info : Installing System.Threading.Tasks.Extensions 4.0.0-rc2-23704.
info : Installing System.Reflection.Emit.Lightweight 4.0.1-rc2-23704.
info : Installing System.Xml.ReaderWriter 4.0.11-rc2-23704.
info : Installing System.Reflection.Emit 4.0.1-rc2-23704.
info : Installing System.Reflection.Emit.ILGeneration 4.0.1-rc2-23704.
info : Installing System.ObjectModel 4.0.11-rc2-23704.
info : Installing System.Dynamic.Runtime 4.0.11-rc2-23704.
info : Installing runtime.win7.System.IO.FileSystem.Watcher 4.0.0-rc2-23704.
info : Installing System.Reflection.Metadata 1.2.0-rc2-23704.
info : Installing System.Collections.Immutable 1.2.0-rc2-23704.
info : Installing System.ComponentModel 4.0.1-rc2-23704.
info : Installing System.ComponentModel.Primitives 4.0.1-rc2-23704.
error: Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0.
error: Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0.
error: Some packages are not compatible with DNXCore,Version=v5.0.
error: Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x64).
error: Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x64).
error: Some packages are not compatible with DNXCore,Version=v5.0 (win7-x64).
error: Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x86).
error: Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x86).
error: Some packages are not compatible with DNXCore,Version=v5.0 (win7-x86).
info : Committing restore...
info : Restore failed in 31377ms.
I don't think you should be using dnx,dnu,dnvm with RC2 stuff - have you
tried using the dotnet restore CLI?
Phil Ricketts
Replete Digital
On 22 February 2016 at 14:07, Roderic Bos [email protected] wrote:
@davidfowl https://github.com/davidfowl
when I create this project.json:{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": true
},"dependencies": { "Microsoft.AspNetCore.Mvc.Razor": "1.0.0-rc2-17085", "NETStandard.Library": "1.0.0-rc2-23704" }, "frameworks": { "dnxcore50": { } }}
which is basically the dotnet new with the extra AspNetCore.Mvc.Razor
dependency, the dotnet restore and dnu restore both fail for runtime 1.0.0-rc2-16541
coreclr x64 windnu restore says
System.ArgumentException: More than one runtime.json file has declared imports for 'win7-x86'
Parameter name: runtimeName
at Microsoft.Dnx.Tooling.RestoreCommand.FindRuntimeDependencies(String runtimeName, List1 runtimeFiles, Dictionary2 effectiveRuntimeSpecs, HashSet1 allRuntimeNames, Func2 circularImport)
at Microsoft.Dnx.Tooling.RestoreCommand.FindRuntimeDependencies(String runtimeName, List1 runtimeFiles, Dictionary2 effectiveRuntimeSpecs, HashSet`1 allRuntimeNames)
at Microsoft.Dnx.Tooling.RestoreCommand.d__69.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Microsoft.Dnx.Tooling.RestoreCommand.<>c__DisplayClass68_0.<b__2>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)at Microsoft.Dnx.Tooling.RestoreCommand.
d__68.MoveNext() and dotnet restore says
info : Running restore with 16 concurrent jobs.
info : Restoring packages for C:\Rc\Projects\Test\project.json...
info : Installing System.Runtime 4.0.21-rc2-23811.
info : Installing System.Linq 4.0.1-rc2-23811.
info : Installing System.Dynamic.Runtime 4.0.11-rc2-23811.
info : Installing System.Reflection 4.1.0-rc2-23811.
info : Installing System.IO.FileSystem 4.0.1-rc2-23811.
info : NotFound https://api.nuget.org/v3-flatcontainer/system.threading.tasks.extensions/index.json 457ms
info : Installing System.Threading.Tasks.Extensions 4.0.0-rc2-23704.
info : Installing System.Reflection.Emit.Lightweight 4.0.1-rc2-23704.
info : Installing System.Xml.ReaderWriter 4.0.11-rc2-23704.
info : Installing System.Reflection.Emit 4.0.1-rc2-23704.
info : Installing System.Reflection.Emit.ILGeneration 4.0.1-rc2-23704.
info : Installing System.ObjectModel 4.0.11-rc2-23704.
info : Installing System.Dynamic.Runtime 4.0.11-rc2-23704.
info : Installing runtime.win7.System.IO.FileSystem.Watcher 4.0.0-rc2-23704.
info : Installing System.Reflection.Metadata 1.2.0-rc2-23704.
info : Installing System.Collections.Immutable 1.2.0-rc2-23704.
info : Installing System.ComponentModel 4.0.1-rc2-23704.
info : Installing System.ComponentModel.Primitives 4.0.1-rc2-23704.
error: Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0.
error: Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0.
error: Some packages are not compatible with DNXCore,Version=v5.0.
error: Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x64).
error: Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x64).
error: Some packages are not compatible with DNXCore,Version=v5.0 (win7-x64).
error: Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x86).
error: Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x86).
error: Some packages are not compatible with DNXCore,Version=v5.0 (win7-x86).
info : Committing restore...
info : Restore failed in 31377ms.—
Reply to this email directly or view it on GitHub
https://github.com/aspnet/Home/issues/1265#issuecomment-187188526.
@IRooc Try adding this dependency, that fixed your project.json for me (albeit on OSX):
"Microsoft.NETCore.Platforms": "1.0.1-*"
@replete and @salerth
I tried with dotnet cli (as mentioned) and also with the extra dependency. but if you do
dotnet new
notepad project.json
///add the line in dependencies:
"Microsoft.AspNetCore.Mvc.Razor": "1.0.0-rc2-17085"
dotnet restore
you get
info : Running restore with 16 concurrent jobs.
info : Restoring packages for C:\Rc\Projects\test2\project.json...
error: Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0.
error: Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0.
error: Some packages are not compatible with DNXCore,Version=v5.0.
error: Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x64).
error: Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x64).
error: Some packages are not compatible with DNXCore,Version=v5.0 (win7-x64).
error: Microsoft.CodeAnalysis.CSharp 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x86).
error: Microsoft.CodeAnalysis.Common 1.1.0-rc1-20151109-01 is not compatible with DNXCore,Version=v5.0 (win7-x86).
error: Some packages are not compatible with DNXCore,Version=v5.0 (win7-x86).
info : Committing restore...
info : Restore failed in 5474ms.
so the Mvc.Razor package or the Mvc package itself for that matter wont restore on 1.0.0-rc2-16541 coreclr x64 on windows
But the renaming issue mentioned above isn't closed yet, so maybe we just have to wait for dnxcore50 to work with mvc again.
@IRooc Last try, sorry my last comment was to fix it on "dnu/dnx" not dotnet.
Try adding this line to your frameworks:
"frameworks": {
"dnxcore50": {
"imports": "portable-net451+win8"
}
}
@salerth
thanks that worked in combination with @davidfowl 's set unstable feed to v2 part.
dotnet cli now works, yeah!
Hi guys, I have similar problem, not sure it is exactly related to this original issue.
I cannot include Ninject.Web.Common package to my project, I've got an error:
NU1002 The dependency Ninject.Web.Common 3.2.3 in project MyProject does not support DNX,Version=4.6
My default dnvm is 1.0.0-rc1-update1 clr x64.
This problem occurs only with this package, with other packages everything is ok.
I spent a lot of time researching such topics like this and didn't find solution works for me.
My colleagues don't have this problem, and we cannot refuse Ninject.Web.Common, because our project requires it. I've installed all updates, try all mentioned solution and it gave no results.
I don't know what to do, I cannot work without this, does anyone have any idea how to fix this?
Thanks.
@vgorobec did you try clearing all the caches on your machine? Just remove all subfolders from
AppData\Local\dnu\cache
AppData\Local\Nuget\v3-cache
.dnx\packages
and check if you don't have a different feed set in you Environment Settings then your coworkers.
Hopefully that helps... Otherwise I don't know, RC1 stuff should just work for the normal feeds currently
@IRooc yeah, finally I resolved my issue, I just removed .dnx, removed my solution folder, got latest files from TFS and rebuilded all projects, now it works.
Thanks @IRooc for your answer, it's almost the same I did.
I have just installed the latest core for the mac, created a new project and added a single dependency for MVC and it does not work.
$ mkdir dot_net
$ cd dot_net/
$ dotnet new
Created new C# project in /Users/dei/dev/deive/dot_net.
$ dotnet restore
log : Restoring packages for /Users/dei/dev/deive/dot_net/project.json...
info : Committing restore...
log : Restore completed in 652ms.
NuGet Config files used:
/Users/dei/dev/deive/dot_net/NuGet.Config
/Users/dei/.nuget/NuGet/NuGet.Config
Feeds used:
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
https://api.nuget.org/v3/index.json
"Microsoft.AspNetCore.Mvc.Core": "1.0.1-*"$ dotnet restore
log : Restoring packages for /Users/dei/dev/deive/dot_net/project.json...
info : GET https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/microsoft.aspnetcore.mvc.core/index.json
info : CACHE https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.mvc.core/index.json
info : NotFound https://dotnetmyget.blob.core.windows.net/artifacts/dotnet-core/nuget/v3/flatcontainer/microsoft.aspnetcore.mvc.core/index.json 1432ms
error: Microsoft.AspNetCore.Mvc.Core 1.0.1 is not compatible with DNXCore,Version=v5.0.
error: Some packages are not compatible with DNXCore,Version=v5.0.
error: Microsoft.AspNetCore.Mvc.Core 1.0.1 is not compatible with DNXCore,Version=v5.0 (osx.10.11-x64).
error: Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64).
info : Committing restore...
log : Restore failed in 2119ms.
Errors in /Users/dei/dev/deive/dot_net/project.json
Microsoft.AspNetCore.Mvc.Core 1.0.1 is not compatible with DNXCore,Version=v5.0.
Some packages are not compatible with DNXCore,Version=v5.0.
Microsoft.AspNetCore.Mvc.Core 1.0.1 is not compatible with DNXCore,Version=v5.0 (osx.10.11-x64).
Some packages are not compatible with DNXCore,Version=v5.0 (osx.10.11-x64).
NuGet Config files used:
/Users/dei/dev/deive/dot_net/NuGet.Config
/Users/dei/.nuget/NuGet/NuGet.Config
Feeds used:
https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
https://api.nuget.org/v3/index.json
Which suggest that aspnetcore is still not yet ready for dotnetcore. When will this be available?
Most helpful comment
@IRooc Last try, sorry my last comment was to fix it on "dnu/dnx" not dotnet.
Try adding this line to your frameworks: