Install Fails
attempting to install in latest dotnet cli (2.1.3) fails and displays following errors
PS C:\pscore\test> dotnet new -i "FiftyProtons.Templates.PSCore::*"
Restoring packages for C:\Users\Chris\.templateengine\dotnetcli\v2.1.3\scratch\restore.csproj...
C:\Users\Chris\.templateengine\dotnetcli\v2.1.3\scratch\restore.csproj : error NU1103: Unable to find a stable package FiftyProtons.Templates.PSCore with version
C:\Users\Chris\.templateengine\dotnetcli\v2.1.3\scratch\restore.csproj : error NU1103: - Found 2 version(s) in nuget.org [ Nearest version: 0.1.0-alpha1 ]
C:\Users\Chris\.templateengine\dotnetcli\v2.1.3\scratch\restore.csproj : error NU1103: - Found 0 version(s) in Microsoft Visual Studio Offline Packages
C:\Users\Chris\.templateengine\dotnetcli\v2.1.3\scratch\restore.csproj : error NU1103: - Found 0 version(s) in C:\Program Files\dotnet\sdk\NuGetFallbackFolder
Generating MSBuild file C:\Users\Chris\.templateengine\dotnetcli\v2.1.3\scratch\obj\restore.csproj.nuget.g.props.
Generating MSBuild file C:\Users\Chris\.templateengine\dotnetcli\v2.1.3\scratch\obj\restore.csproj.nuget.g.targets.
Restore failed in 196.46 ms for C:\Users\Chris\.templateengine\dotnetcli\v2.1.3\scratch\restore.csproj.
Hmm - sorry about that; I'm at the airport right now but I'll give this a look as soon as I can.
I'm on a very low bandwidth connection at the moment, so I can't test this myself yet, but I believe the syntax has changed slightly - you should be able to use dotnet new -i FiftyProtons.Templates.PSCore (leave off the ::*).
Would you mind giving that a try and letting me know if it works for you, @clmcgrath?
Ah - I think I understand the issue. There are 2 problems. One is that there is no stable package (I'll publish one when I get back to civilisation) and the other is that no version was specified.
This worked for me (although it still complains about there not being a stable version):
dotnet new -i 'FiftyProtons.Templates.PSCore::0.1.0-alpha1'
dotnet new -i FiftyProtons.Templates.PSCore didn't work for me have the same errors as before, but the dotnet new -i 'FiftyProtons.Templates.PSCore::0.1.0-alpha1' seems to be working
Ok, thanks - I'll update the instructions in the README until I can get a stable package published.
BTW, I've had a look at the latest version of PowerShell Core and things have moved around a little (for one thing, modules need to target netcoreapp2.0. I'll get the template updated :)
In the meanwhile, this is the basic project file you'll need:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.PowerShell.SDK" Version="6.0.0-rc.2"/>
</ItemGroup>
</Project>
ya i noticed that you were still targetting 1.6 after i generated a project from the template
Just tried updated template with PSCore RC2 and everything seems to work, so will publish a new package as soon as I have decent bandwidth.
Sorry for the delay, @clmcgrath - I completely forgot about this while I was travelling! Have published v0.2.2 (package should show up on NuGet in 20 mins or so) and I believe the issue will then be resolved :)