Closed alexdresko closed 5 years ago
Okay for the SDK 2.2.101 but you also need the Runtime 2.2.0 https://dotnet.microsoft.com/download/dotnet-core/2.2
Unfortunately, that didn't help. Same problem after installing the runtime and rebooting. For the record, I do have the latest version of VS 2017 installed.
Trying to figure out how to diagnose the problem further.
Just for kicks, I tried the following (nuget install...
as opposed to dotnet new -i...
):
C:\code\test\ocinstall> nuget.exe install OrchardCore.Templates -Version 1.0.0-beta3-70362 -Source https://www.myget.org /F/orchardcore-preview/api/v3/index.json Feeds used: https://www.myget.org/F/orchardcore-preview/api/v3/index.json
Attempting to gather dependency information for package 'OrchardCore.Templates.1.0.0-beta3-70362' with respect to project 'C:\code\test\ocinstall', targeting 'Any,Version=v0.0' Gathering dependency information took 8.36 sec Attempting to resolve dependencies for package 'OrchardCore.Templates.1.0.0-beta3-70362' with DependencyBehavior 'Lowest' Unable to resolve dependency 'Castle.Core'. Source(s) used: 'nuget.org', 'Microsoft Visual Studio Offline Packages'.
Wonder if my feeds aren't configured correctly?
Also for the record, here my dotnet --info
:
C:\code\test\ocinstall> dotnet --info .NET Core SDK (reflecting any global.json): Version: 2.2.101 Commit: 236713b0b7
Runtime Environment: OS Name: Windows OS Version: 10.0.17134 OS Platform: Windows RID: win10-x64 Base Path: C:\Program Files\dotnet\sdk\2.2.101\
Host (useful for support): Version: 2.2.0 Commit: 1249f08fed
.NET Core SDKs installed: 1.1.0 [C:\Program Files\dotnet\sdk] 2.0.0 [C:\Program Files\dotnet\sdk] 2.0.2 [C:\Program Files\dotnet\sdk] 2.0.3 [C:\Program Files\dotnet\sdk] 2.1.2 [C:\Program Files\dotnet\sdk] 2.1.4 [C:\Program Files\dotnet\sdk] 2.1.100 [C:\Program Files\dotnet\sdk] 2.1.101 [C:\Program Files\dotnet\sdk] 2.1.102 [C:\Program Files\dotnet\sdk] 2.1.103 [C:\Program Files\dotnet\sdk] 2.1.104 [C:\Program Files\dotnet\sdk] 2.1.200 [C:\Program Files\dotnet\sdk] 2.1.201 [C:\Program Files\dotnet\sdk] 2.1.202 [C:\Program Files\dotnet\sdk] 2.1.300 [C:\Program Files\dotnet\sdk] 2.1.301 [C:\Program Files\dotnet\sdk] 2.1.400 [C:\Program Files\dotnet\sdk] 2.1.401 [C:\Program Files\dotnet\sdk] 2.1.402 [C:\Program Files\dotnet\sdk] 2.1.403 [C:\Program Files\dotnet\sdk] 2.1.500 [C:\Program Files\dotnet\sdk] 2.1.502 [C:\Program Files\dotnet\sdk] 2.2.101 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed: Microsoft.AspNetCore.All 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.All 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All] Microsoft.AspNetCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.AspNetCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App] Microsoft.NETCore.App 1.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 1.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.0.9 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.4 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.5 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App] Microsoft.NETCore.App 2.2.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
@jtkech Just got the same error ("Installing OrchardCore.Templates 1.0.0-beta3-70362.C:\Users\Administrator.templateengine\dotnetcli\v2.2.101\scratch\restore.csproj : error NU1202: Package OrchardCore.Tem plates 1.0.0-beta3-70362 is not compatible with netcoreapp1.0 (.NETCoreApp,Version=v1.0). Package OrchardCore.Templates 1.0.0-beta3-70362 supports: netstandard2.0 (.NETStandard,Version=v2.0)")
..but on a completely different machine. The first machine is a Windows 10 Pro (fully updated) and the second machine is a fully updated Windows Server 2012R2.
Happy to help however I can. Just not sure what to do at this point. I've done quite a bit of testing and digging to no avail.
Okay, no worries, just tried with the last dev, it works but the doc is not up to date.
With the last dev, try as documented but with OrchardCore.ProjectTemplates
.
Also, with the last dev, in your generated projects (or a shared parent directory) you will need a NuGet.config
file with the following feeds.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<clear />
<add key="NuGet" value="https://api.nuget.org/v3/index.json" />
<add key="OrchardCore" value="https://www.myget.org/F/orchardcore-preview/api/v3/index.json" />
</packageSources>
<disabledPackageSources />
</configuration>
Note: Hmm; i think that when you tried it with beta2 you would have to use OC.Templates
in place of OC.Cms.Templates
. Then, because the generated project reference Microsoft.AspNetCore.App
without any version, it uses the last one on your machine. So, you would have to install a previous version of the runtime and then use a specific version in your project file.
Adding the Nuget OrchardCore feed directly in Visual Studio Nuget parameters normally should work.
So, you would have to install a previous version of the runtime and then use a specific version in your project file.
I don't have a project file. I'm trying to install the dev templates in order to create a new project.
I just tried creating a global.json file in my temporary directory to force dotnet.exe to a specific version.
{
"sdk": {
"version": "2.2.101"
}
}
You can get a list of .NET Core versions with dotnet --info
. 2.2.101 is pretty much the only version that supports the --nuget-source
parameter. So I feel like that part is correct.
Okay cool.
Okay, as you i get the same errors when using the same commands.
Then, did you try by using ProjectTemplates
? It works on my side.
dotnet new -i OrchardCore.ProjectTemplates::1.0.0-beta3-* --nuget-source https://www.myget.org/F/orchardcore-preview/api/v3/index.json
Then i was able to do dotnet new occms MyApp
and run MyApp
.
By golly, that was it!
Your comment from yesterday probably would have gotten things working for me if I paid a little more attention. In my experimenting, I noticed that OrchardCore.Cms.Templates
wasn't working, and I naturally just assumed that OrchardCore.Templates
was the new replacement. When you mentioned yesterday to try OrchardCore.ProjectTemplates
, I thought I had already done that because I didn't see "Cms" in the name.
I did still have to add the nuget.config file as prescribed, but she's up and working now. Super excited! Thanks for being so patient with me.
@sebastienros I reopened this, because the documentation needs to be fixed with the changes mentioned in the last two comments. It's a small change, but I didn't have time to look into it, so I just reopened so it's not forgotten.
Ah... So "latest" in the docs is the master branch? That's kind of confusing. I don't remember exactly how I got to that link, but I definitely remember that I didn't see any other option or the ability to switch to "dev". In that sense, I think "dev" should be the default branch for the docs (that's what I select for BitBucket repos for example), since that's the one that is being worked on and represents the current state of the project most accurately.
Per https://orchardcore.readthedocs.io/en/latest/Templates/README/#installing-the-orchard-cms-templates, I'm supposed to run
dotnet new -i OrchardCore.Cms.Templates::1.0.0-beta2-* --nuget-source https://www.myget.org/F/orchardcore-preview/api/v3/index.json
. Running that command results in the following error (important parts highlighted):With a little sleuthing, I got a little closer by running
dotnet new -i OrchardCore.Templates::1.0.0-beta3-* --nuget-source https://www.myget.org/F/orchardcore-preview/api/v3/index.json
Unfortunately, now I get (important parts highlighted):
Here's my donet cli version:
Kinda stuck at this point. I figure someone here knows exactly what the problem is and can save me another couple of hours of frustration. At least, I hope. :)