Closed sds123 closed 8 years ago
same error here.
Please do not use arbitrary CLI versions to build MusicStore. Our build system locks on specific CLI versions which work for ASP.NET. if you are trying to build MusicStore, you can just clone (if you have already cloned, then delete the .build
folder which might got generated earlier) and run the build command (build.cmd or build.sh if on non-windows). Try this and let us know if you still see an issue.
Thank you @kichalla for your response. I followed the steps you mentioned
I got the below errors
Errors in C:\.....\MusicStore-dev\MusicStore-dev\src\MusicStore\project.json
Unable to resolve 'Microsoft.AspNetCore.DataProtection (>= 1.0.0-rc3-20533)' for '.NETCoreApp,Version=v1.0'.
Unable to resolve 'Microsoft.AspNetCore.Http (>= 1.0.0-rc3-20533)' for '.NETCoreApp,Version=v1.0'.
Unable to resolve 'Microsoft.AspNetCore.Http.Extensions (>= 1.0.0-rc3-20533)' for '.NETCoreApp,Version=v1.0'.
Unable to resolve 'Microsoft.AspNetCore.Razor.Tools (>= 1.0.0)' for '.NETStandardApp,Version=v1.5'.
Errors in C:\.....\MusicStore-dev\MusicStore-dev\src\MusicStore\project.json
Unable to resolve 'Microsoft.AspNetCore.DataProtection (>= 1.0.0-rc3-20533)' for '.NETStandardApp,Version=v1.5'.
Unable to resolve 'Microsoft.AspNetCore.Http (>= 1.0.0-rc3-20533)' for '.NETStandardApp,Version=v1.5'.
Unable to resolve 'Microsoft.AspNetCore.Http.Extensions (>= 1.0.0-rc3-20533)' for '.NETStandardApp,Version=v1.5'.
Errors in C:\.....\MusicStore-dev\MusicStore-dev\src\MusicStore\project.json
Unable to resolve 'Microsoft.AspNetCore.DataProtection (>= 1.0.0-rc3-20533)' for '.NETStandardApp,Version=v1.5'.
Unable to resolve 'Microsoft.AspNetCore.Http (>= 1.0.0-rc3-20533)' for '.NETStandardApp,Version=v1.5'.
Unable to resolve 'Microsoft.AspNetCore.Http.Extensions (>= 1.0.0-rc3-20533)' for '.NETStandardApp,Version=v1.5'.
Unable to resolve 'Microsoft.AspNetCore.DataProtection (>= 1.0.0-rc3-20533)' for '.NETFramework,Version=v4.5.1'.
Unable to resolve 'Microsoft.AspNetCore.Http (>= 1.0.0-rc3-20533)' for '.NETFramework,Version=v4.5.1'.
Unable to resolve 'Microsoft.AspNetCore.Http.Extensions (>= 1.0.0-rc3-20533)' for '.NETFramework,Version=v4.5.1'.
NuGet Config files used:
C:\.....MusicStore-dev\MusicStore-dev\NuGet.Config
C:\Users\.....\AppData\Roaming\NuGet\NuGet.Config
Feeds used:
https://dotnet.myget.org/F/cli-deps/api/v3/index.json
https://api.nuget.org/v3/index.json
Kindly let me know , if I am missing on anything
You need to add
"runtimes":{ "osx.10.11-x64": {}, "ubuntu.14.04-x64": {}, "win7-x64":{} },
to you project.json
Thank you @BeelzeBu . Yes , when I run build.cmd , I can compile the application.
My question is , which is the cli version locked for MusicStore ,
All I want to do is, get the exact cli version and run below commands
Update: Got it , cli gets downloaded at c:\Users\.....\AppData\Local\Microsoft\dotnet\
Hi @BeelzeBu , @kichalla I managed to restore, build , run the server project in src/MusicStore. I have deployed it at "http://localhost:5005/" successfully !!!!!
Now I open project at test/E2Etest.
I can restore and build the project successfully. However when I execute command dotnet test
, I get error at
line 124 var deploymentResult = deployer.Deploy();
Below is error message
xUnit.net Runner (64-bit win81-x64)
Discovering: E2ETests
Discovered: E2ETests
Starting: E2ETests
E2ETests.SmokeTests_X64.WindowsOS(serverType: Kestrel, runtimeFlavor: CoreClr, architecture: x64, applicationBaseUrl: "http://localhost:5005/") [FAIL]
System.Exception : dotnet publish exited with exit code : 1
Stack Trace:
at Microsoft.AspNetCore.Server.Testing.ApplicationDeployer.DotnetPublish(String publishRoot)
at Microsoft.AspNetCore.Server.Testing.SelfHostDeployer.Deploy()
C:\.....\MusicStore-dev\test\E2ETests\SmokeTests.cs(124,0): at E2ETests.SmokeTests.<SmokeTestSuite>d__2.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 System.Runtime.CompilerServices.TaskAwaiter.GetResult()
C:\.....\MusicStore-dev\test\E2ETests\SmokeTests.cs(39,0): at E2ETests.SmokeTests_X64.<WindowsOS>d__2.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)
--- 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)
--- 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)
Kindly can you help here
I was able to build using dotnet-cli 1.0.0-rc2-002416 using the following project.json
{ "authors": [ "Microsoft" ... "Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0-", "Microsoft.NETCore.App": { "type": "platform", "version": "1.0.0-" } }, "frameworks": { //"net46": { }, "netcoreapp1.0": { "imports": [ "portable-net45+wp80+win8+wpa81+dnxcore50", "portable-net45+win8+wp8+wpa81", "portable-net45+win8+wp8" ] }
} }
Framework net46 gives an error: error NU1002: The dependency System.Runtime.Loader 4.0.0-rc2-24015 does not support framework .NETFramework,Version=v4.6.1.
Running on dotnetcore runs ok.
Move the dependency on Microsoft.NETCore.App to the netcoreapp target framework only.
Thanks David. This works. I think the correct config for rc2 is:
"dependencies": {
"Microsoft.AspNetCore.Authentication.Cookies": "1.0.0-*",
"Microsoft.AspNetCore.Authentication.Facebook": "1.0.0-*",
"Microsoft.AspNetCore.Authentication.Google": "1.0.0-*",
"Microsoft.AspNetCore.Authentication.MicrosoftAccount": "1.0.0-*",
"Microsoft.AspNetCore.Authentication.OpenIdConnect": "0.1.0-*",
"Microsoft.AspNetCore.Authentication.Twitter": "1.0.0-*",
"Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
"Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore": "1.0.0-*",
"Microsoft.AspNetCore.Identity.EntityFrameworkCore": "1.0.0-*",
"Microsoft.AspNetCore.Mvc": "1.0.0-*",
"Microsoft.AspNetCore.Mvc.TagHelpers": "1.0.0-*",
"Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
"Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
"Microsoft.AspNetCore.Server.WebListener": "0.1.0-*",
"Microsoft.AspNetCore.Session": "1.0.0-*",
"Microsoft.AspNetCore.StaticFiles": "1.0.0-*",
"Microsoft.EntityFrameworkCore.InMemory": "1.0.0-*",
"Microsoft.EntityFrameworkCore.SqlServer": "1.0.0-*",
"Microsoft.Extensions.Configuration.CommandLine": "1.0.0-*",
"Microsoft.Extensions.Configuration.EnvironmentVariables": "1.0.0-*",
"Microsoft.Extensions.Configuration.Json": "1.0.0-*",
"Microsoft.Extensions.Logging.Console": "1.0.0-*",
"Microsoft.Extensions.Options.ConfigurationExtensions": "1.0.0-*"
},
"frameworks": {
"net451": {},
"netcoreapp1.0": {
"dependencies": {
"Microsoft.NETCore.App": {
"type": "platform",
"version": "1.0.0-*"
}
},
"imports": [
"portable-net45+wp80+win8+wpa81+dnxcore50",
"portable-net45+win8+wp8+wpa81",
"portable-net45+win8+wp8"
]
}
}
}
Thanks all @BeelzeBu , @kichalla .......I have 1 question. Could anyone successfully run E2ETest
I get the below error
Project E2ETests (.NETStandardApp,Version=v1.5) was previously compiled. Skipping compilation.
xUnit.net Runner (64-bit win81-x64)
Discovering: E2ETests
Discovered: E2ETests
Starting: E2ETests
E2ETests.SmokeTests_X64.WindowsOS(serverType: Kestrel, runtimeFlavor: CoreClr, architecture: x64, applicationBaseUrl: "http://localhost:5000/") [FAIL]
System.ComponentModel.Win32Exception : The system cannot find the file specified
Stack Trace:
at System.Diagnostics.Process.StartCore(ProcessStartInfo startInfo)
at Microsoft.AspNetCore.Server.Testing.ApplicationDeployer.DotnetPublish(String publishRoot)
at Microsoft.AspNetCore.Server.Testing.SelfHostDeployer.Deploy()
c:\Musicstore\MusicStore-dev\test\E2ETests\SmokeTests.cs(92,0): at E2ETests.SmokeTests.<SmokeTestSuite>d__2.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 System.Runtime.CompilerServices.TaskAwaiter.GetResult()
c:\Musicstore\MusicStore-dev\test\E2ETests\SmokeTests.cs(39,0): at E2ETests.SmokeTests_X64.<WindowsOS>d__2.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)
--- 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)
--- 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)
Output:
| Information: Deploying [Variation] :: ServerType=Kestrel, Runtime=CoreClr, Arch=x64, BaseUrlHint=http://localhost:5000/, Publish=True
| Information: Executing command dotnet publish "c:\Musicstore\MusicStore-dev\src\MusicStore" -o "C:\Users\.....\AppData\Local\Temp\a36dd7a7-1b74-4c58-a14d-9babb7b3f34d" --framework netstandardapp1.5
| Warning: Host process already exited or never started successfully.
| Warning: Failed to delete directory : Could not find a part of the path 'C:\Users\.....\AppData\Local\Temp\a36dd7a7-1b74-4c58-a14d-9babb7b3f34d'.
| Information: Trying to drop database 'MusicStore_Test_7ffe29bebae0498c8876b29223d344c3'
| Information: Successfully dropped database MusicStore_Test_7ffe29bebae0498c8876b29223d344c3
| Information: [Time]: Total time taken for this test variation '0.175127' seconds
Finished: E2ETests
Closing this because we haven't seen these issues in quite some time. These issues are often caused by temporary mismatches in versions. If you're seeing any new issues please log a new issue. Thanks!
Hi, I have downloaded the latest .net cli from [https://github.com/dotnet/cli ]() The version of .net cli I am using is
1.0.0-rc2-002306
.Later I navigated to folder src/Musicstore using cmd prompt and executed the below commands
However I see error msg
I know , we will have to update the Project.json. Kindly can anyone guide me what changes are supposed to be made to get the same working.