I followed the documentation, and downloaded "ASP.NET Core & Angular 2.x" project.
I merged the files in Client folder into root folder of MyProject.Web.Host project in Server solution by exactly following instruction of "Merge Angular2 Client and Server Project".
I tried to build the solution. It failed. :(
There is a warning under *.Web.Host\Dependencies: npm – not installed. I double checked, the npm is installed on my computer. I verified it by npm --version, and it tell me 3.10.10.
I tried the "Database Migrations". I don't know how to run the "tool" in ".Migrator project", so I tried to use command "dotnet ef database update". It failed too. :( The error message is:
The specified framework 'Microsoft.NETCore.App', version '1.1.0' was not found.
- Check application dependencies and target a framework version installed at: C:\Program Files\dotnet\shared\Microsoft.NETCore.App
- The following versions are installed: 1.0.1
- Alternatively, install the framework version '1.1.0'.
I am stuck here. Please advise what should I do! :( :( :(
Thanks,
10 Answer(s)
-
0
Hi,
Have you installed <a class="postlink" href="https://www.microsoft.com/net/download/core#/current">https://www.microsoft.com/net/download/core#/current</a> ?
-
0
I just followed your link to download and install .NET Core 1.1.1 SDK.
When I start my solution in VS2015, it gives me a popup with error: :(
The following error occurred attempting to run the project model server process (1.0.1). Unable to start the process. No executable found matching command "dotnet-projectmodel-server" The project model server process provides intellisense, build, and reference information to Visual Studio and without it your experience will be very limited. Please try closing and reopening Visual Studio to see if that corrects the problem. Alternatively, check that the .NET Core SDK is properly installed.
I closed this message and tried to unload / reload all projects, and build solution. It gives out an error on each project: :(
Error MSB4019 The imported project "C:\Program Files\dotnet\sdk\1.0.1\Microsoft\VisualStudio\v14.0\DotNet\Microsoft.DotNet.Props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
Please advise!
Thanks, p.s. The warning is still there. It is under *.Web.Host\Dependencies: npm – not installed. I double checked, the npm is installed on my computer. I verified it by npm --version, and it tell me 3.10.10.
-
0
Hi,
Did you installed Visual Studio 2017 to your computer ? If so, please add a file to your solution named "global.json" and copy below content in it.
{ "projects": [ "src", "test" ], "sdk": { "version": "1.0.0-preview2-1-003177" } }
If you don't have version "1.0.0-preview2-1-003177" in your computer, change it with a version you have. You can check installed versions under C:\Program Files\dotnet\sdk
-
0
Ok. I tried to redo everything from scratch. I uninstalled VS2015 and .NET frameworks. Installed VS 2017 with .NET Core 1.0.0 as your instructed. Download ASP.NET Zero v3.3.0. After unzip it, I assume the folder "angular" and "aspnet-core" are the folder "Client" and "Server" on your documents. Am I correct?
I followed "Merging Angular 2.x Client and Server solution" link in Documents, but realized there is no "project.json" file in "angular" folder, neither in "aspnet-core" folder. Did I miss something?
Then, I tried the "Database Migrations". I changed the connectionstrings in .Web.Host\appsettings.json with "Default": "Server=(localdb)\mssqllocaldb; Database=MyProjectDb; Trusted_Connection=True;" (My other projects use this server name and all works fine). I used Migration Command, but got two warnings and failed with "Login failed for user 'myDomain/myUsername'". I tried to use "Server=localhose" as the instruction in Documents, but got the same result. Here are the message after running the command:
C:\dev\MyProject\aspnet-core\src\MyProject.EntityFramework>dotnet ef database update Microsoft (R) Build Engine version 15.1.548.43366 Copyright (C) Microsoft Corporation. All rights reserved. Consider app.config remapping of assembly "System.Security.Cryptography.X509Certificates, Culture=neutral, PublicKeyToken=b03........" from Version "4.0.0.0" [] to Version "4.1.1.0" [C:\Users\fguo.nuget\packages\system.security.cryptography.x509certificates\4.3.0\ref\net461\System.Security.Cryptography.X509Certificates.dll] to solve conflict and get rid of warning. C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Security.Cryptography.X509Certificates" culture="neutral" publicKeyToken="b03…….." /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding> [C:\dev\MyProject\aspnet-core\src\MyProject.Core\MyProject.Core.csproj] MyProject.Core -> C:\dev\MyProject\aspnet-core\src\MyProject.Core\bin\Debug\net461\MyProject.Core.dll Consider app.config remapping of assembly "System.Net.Http, Culture=neutral, PublicKeyToken=b0........" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.Net.Http.dll] to Version "4.1.1.0" [C:\Users\fguo.nuget\packages\system.net.http\4.3.0\ref\net46\System.Net.Http.dll] to solve conflict and get rid of warning. Consider app.config remapping of assembly "System.IO.Compression, Culture=neutral, PublicKeyToken=b77........" from Version "4.0.0.0" [C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETFramework\v4.6.1\System.IO.Compression.dll] to Version "4.1.2.0" [C:\Users\fguo.nuget\packages\system.io.compression\4.3.0\ref\net46\System.IO.Compression.dll] to solve conflict and get rid of warning. Consider app.config remapping of assembly "System.Security.Cryptography.X509Certificates, Culture=neutral, PublicKeyToken=b03........" from Version "4.0.0.0" [] to Version "4.1.1.0" [C:\Users\fguo.nuget\packages\system.security.cryptography.x509certificates\4.3.0\ref\net461\System.Security.Cryptography.X509Certificates.dll] to solve conflict and get rid of warning. Consider app.config remapping of assembly "Newtonsoft.Json, Culture=neutral, PublicKeyToken=30a........" from Version "6.0.0.0" [] to Version "9.0.0.0" [C:\Users\fguo.nuget\packages\newtonsoft.json\9.0.1\lib\net45\Newtonsoft.Json.dll] to solve conflict and get rid of warning. C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkId=294190">http://go.microsoft.com/fwlink/?LinkId=294190</a>. [C:\dev\MyProject\aspnet-core\src\MyProject.EntityFramework\MyProject.EntityFramework.csproj] MyProject.EntityFramework -> C:\dev\MyProject\aspnet-core\src\MyProject.EntityFramework\bin\Debug\net461\MyProject.EntityFramework.exe Build succeeded. C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3247: Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Security.Cryptography.X509Certificates" culture="neutral" publicKeyToken="b03........" /><bindingRedirect oldVersion="0.0.0.0-4.1.1.0" newVersion="4.1.1.0" /></dependentAssembly></assemblyBinding> [C:\dev\MyProject\aspnet-core\src\MyProject.Core\MyProject.Core.csproj] C:\Program Files\dotnet\sdk\1.0.0\Microsoft.Common.CurrentVersion.targets(1964,5): warning MSB3276: Found conflicts between different versions of the same dependent assembly. Please set the "AutoGenerateBindingRedirects" property to true in the project file. For more information, see <a class="postlink" href="http://go.microsoft.com/fwlink/?LinkId=294190">http://go.microsoft.com/fwlink/?LinkId=294190</a>. [C:\dev\MyProject\aspnet-core\src\MyProject.EntityFramework\MyProject.EntityFramework.csproj] 2 Warning(s) 0 Error(s) Time Elapsed 00:00:01.21
Target migration: latest Login failed for user 'myDomain\myUsername'.
Please advise! Thanks,
-
0
Hi,
It seems like your user (Login failed for user 'myDomain\myUsername'.) does not have access to SQL Server. You can specify username and password in your connection string if you have that information.
-
0
When I reopen my project in VS and redo the migration command, it went through, although the warnings are still there. Now, I can run the template on localhost! :D Thank you for your support! :D
The problem is that, I don't know how to register a user. :?: The "Login" popup can only accept "admin". I entered a new username and clicked "Email Activation". It responded "Invalid email".
Usually, there should be a "Sign In" and a "Sign up" options. The "Sign In" for registered users, and the "Sign up" for requesting/registering a new user account. Do you include this option on the template? Or we need to build this kind screen by myself?
Thanks again!
-
0
Hi,
There is a register screen but it is visible only when you switch to a tenant. In order to do that, in the login page, click change tenant and use "Default" tenancy name.
I hope this helps.
Thanks.
-
0
Understand. I just tried disabling multi-tenancy by following the documents: "Configuration.MultiTenancy.IsEnabled = false;". Now, I can click "Create Account" to pop up the "Sign Up" window. It's good! :D
Just for curious, if a new tenant wants to register, how do I handle?
-
0
Never mind. I am reading the development guide and got the answer about multi-tenancy. This topic can be closed now.
Thanks again for your support! :D
-
0
I'm glad that you are making progress :)