Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "klawsuc"

I get the following error when starting my app on the server (Core 1.1 + Angular 4 - aspnetzero 4.1.1)

Application startup exception: System.Data.SqlClient.SqlException: Invalid object name 'AbpEditions'.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, String executeMethod, IReadOnlyDictionary`2 parameterValues, Boolean closeConnection)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteReader(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryingEnumerable.Enumerator.BufferlessMoveNext(Boolean buffer)
   at Microsoft.EntityFrameworkCore.Storage.Internal.SqlServerExecutionStrategy.Execute[TState,TResult](Func`2 operation, Func`2 verifySucceeded, TState state)
   at Microsoft.EntityFrameworkCore.Query.QueryMethodProvider.<_ShapedQuery>d__3`1.MoveNext()
   at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
   at lambda_method(Closure , QueryContext )
   at Microsoft.EntityFrameworkCore.Query.Internal.QueryCompiler.&lt;&gt;c__DisplayClass20_0`1.<CompileQueryCore>b__0(QueryContext qc)
   at System.Linq.Queryable.FirstOrDefault[TSource](IQueryable`1 source, Expression`1 predicate)
   at SquireLab.Migrations.Seed.Host.DefaultEditionCreator.CreateEditions() in 
...
ClientConnectionId:f35937a1-f012-41ce-b256-9d370b18d9e2
Error Number:208,State:1,Class:16
Hosting environment: Production
Content root path: C:\...
Now listening on: http://localhost:5291
Application started. Press Ctrl+C to shut down.

Maybe someone can benefit from my two wasted days. Adding the following to the *.Web.Host.csporj file allowed me to build the application. In my case I wanted to use Typescript 2.5. I'm not sure why setting the TypeScriptToolsVersion property doesn't work properly...i.e. some of the calls are still made to "C:\Program Files (x86)\Microsoft SDKs\TypeScript\tsc.exe"

<PropertyGroup>
    <TscToolPath>C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5</TscToolPath>
  </PropertyGroup>

Also the instructions at <a class="postlink" href="https://www.aspnetzero.com/Documents/Merge-Angular-Client-Server">https://www.aspnetzero.com/Documents/Me ... ent-Server</a> failed to mention that you need to make sure outDir in .angular-cli.json is set to wwwroot/dist. This is already the case in 4.4.0 when downloading an already merged app but was not in 4.1.1 having to manually merge the client with server app.

Also I want to clarify that I merged core and angular properly for the 4.1.1 version. I followed the instructions at <a class="postlink" href="https://www.aspnetzero.com/Documents/Merge-Angular-Client-Server">https://www.aspnetzero.com/Documents/Me ... ent-Server</a> I notice it states Angular 2 so I'm not sure if using core + angular 4 is different.

Still having an issue trying to get the site published properly. One thing I noticed is that tsc.exe is being called at C:\Program Files (x86)\Microsoft SDKs\TypeScript\tsc.exe. That version is for VS 2012 (which I still have installed for legacy apps). However I have TS 2.1, 2.3, and 2.5 installed in their respective directories. In the project file I specify the target TS to be 2.5 (<TypeScriptToolsVersion>Latest</TypeScriptToolsVersion>). So the error happens at

C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5\build\Microsoft.TypeScript.targets(247,5): error MSB6006: "tsc.exe" exited with code 1.

But the initial tsc file that's called is

C:\Program Files (x86)\Microsoft SDKs\TypeScript\tsc.exe --project "C:\inetpub\SquireLab_angular_4.1.1\aspnet-core\src\SquireLab.Web.Host\e2e\tsconfig.json" --listEmittedFiles --locale en-US

Is it normal for two different tsc programs to be called? Is there a way to only use 2.5?

Seems like I'm just talking to myself here but in case someone comes across this and has an answer. I added the following to csproj but I not sure what the side effects might be:

<TypeScriptCompileBlocked>true</TypeScriptCompileBlocked>

Here is the log related to the tsc where I had an issue previously

Target PreComputeCompileTypeScriptWithTSConfig:
Using "VsTsc" task from assembly "C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5\build\TypeScript.Tasks.dll".
Task "VsTsc"
    Unknown output: TypeScript compile is skipped because the TypeScriptCompileBlocked property is set to 'true'.
Done executing task "VsTsc".
Task "VsTsc"
    Unknown output: TypeScript compile is skipped because the TypeScriptCompileBlocked property is set to 'true'.
Done executing task "VsTsc".
Target CompileTypeScriptWithTSConfig:
  Task "VsTsc"
    Unknown output: TypeScript compile is skipped because the TypeScriptCompileBlocked property is set to 'true'.
Done executing task "VsTsc".
  Task "VsTsc"
    Unknown output: TypeScript compile is skipped because the TypeScriptCompileBlocked property is set to 'true'.
 Done executing task "VsTsc".

Digging a bit further, looks like Target CompileTypeScriptWithTSConfig: Task "VsTsc" are running C:\Program Files (x86)\Microsoft SDKs\TypeScript\tsc.exe which is an old VS 2012 file. How do I force it to use C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5\tsc.exe?

I already have the following in the csproj file:

<TypeScriptToolsVersion>2.5</TypeScriptToolsVersion>

I turned on detailed logging and here is where the issue occurs:

C:\Program Files (x86)\Microsoft SDKs\TypeScript\tsc.exe --project "C:\inetpub\myproject_4.4.0\src\MyProject.Web.Host\e2e\tsconfig.json" --listEmittedFiles --locale en-US
Unknown output: Unknown extension for file: "C:\inetpub\myproject_4.4.0\src\MyProject.Web.Host\e2e\tsconfig.json". Only .ts and .d.ts extensions are allowed.
Unknown output: Unknown extension for file: "en-US". Only .ts and .d.ts extensions are allowed.
Unknown output: Unknown option 'project'
Unknown output: Use the '--help' flag to see options
Unknown output: Unknown option 'listEmittedFiles'
Unknown output: Use the '--help' flag to see options
Unknown output: Unknown option 'locale'
Unknown output: Use the '--help' flag to see options
C:\Program Files (x86)\Microsoft SDKs\TypeScript\2.5\build\Microsoft.TypeScript.targets(247,5): error MSB6006: "tsc.exe" exited with code 1.

I also have a solution built on 4.1.1 and it works fine. The one thing I did for the 4.4.0 build is to add the nuget package System.ComponentModel.TypeConverter to all the projects as proposed at #3739@78245cf2-355c-4cd1-a9a8-be05b24814ae

Using build 4.4.0 (Core + Angular), Visual Studio 2017, Typescript 2.5 (installed VS extension). I get the following error when I try to build the *.Web.Host project.

npm - v5.4.1 node - v6.11.3 tsc - v0.8.3.1

I'm having a similar issue using build 4.1.1 (Core1.1 + Angular4). My projects are merged. I can build the project and run it in development but when I publish the Host project I get this error:

Can't resolve './$$_gendir/root.module.ngfactory' in 'C:\inetpub\aspnetzero_angular_4.1.1\aspnet-core\src\MyPorject.Web.Host\src' MyProject.Web.Host

I followed this documentation: <a class="postlink" href="https://www.aspnetzero.com/Documents/Merge-Angular-Client-Server">https://www.aspnetzero.com/Documents/Me ... ent-Server</a>

Showing 11 to 20 of 23 entries