Closed wknsJimmy closed 2 years ago
@wknsJimmy thanks for reporting. Can you please help us with following answers,
3. [cid:image003.png@01D6EA06.79E25DF0]
From: Udeesha Gautam notifications@github.com Sent: Wednesday 13 January 2021 23:22 To: microsoft/azuredatastudio azuredatastudio@noreply.github.com Cc: Kealy, Howard (Naas) Howard.Kealy@sgs.com; Mention mention@noreply.github.com Subject: [EXTERNAL] Re: [microsoft/azuredatastudio] Using SQL Database Projects extension version 0.5.1 - Build fails (#13955)
WARNING: this message is from an EXTERNAL SENDER. Please be cautious, particularly with links and attachments.
@wknsJimmyhttps://github.com/wknsJimmy thanks for reporting. Can you please help us with following answers,
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azuredatastudio/issues/13955#issuecomment-759820716, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASOT5XERPSDYC27AP2G4NTTSZYTH5ANCNFSM4WBN2WUQ.
Information in this email and any attachments is confidential and intended solely for the use of the individual(s) to whom it is addressed or otherwise directed. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the Company. Finally, the recipient should check this email and any attachments for the presence of viruses. The Company accepts no liability for any damage caused by any virus transmitted by this email. All SGS services are rendered in accordance with the applicable SGS conditions of service available on request and accessible at https://www.sgs.com/en/terms-and-conditions
Just an update to point 1: Yes the project builds in SSDT and I get my dacpac
From: Udeesha Gautam notifications@github.com Sent: Wednesday 13 January 2021 23:22 To: microsoft/azuredatastudio azuredatastudio@noreply.github.com Cc: Kealy, Howard (Naas) Howard.Kealy@sgs.com; Mention mention@noreply.github.com Subject: [EXTERNAL] Re: [microsoft/azuredatastudio] Using SQL Database Projects extension version 0.5.1 - Build fails (#13955)
WARNING: this message is from an EXTERNAL SENDER. Please be cautious, particularly with links and attachments.
@wknsJimmyhttps://github.com/wknsJimmy thanks for reporting. Can you please help us with following answers,
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/microsoft/azuredatastudio/issues/13955#issuecomment-759820716, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASOT5XERPSDYC27AP2G4NTTSZYTH5ANCNFSM4WBN2WUQ.
Information in this email and any attachments is confidential and intended solely for the use of the individual(s) to whom it is addressed or otherwise directed. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of the Company. Finally, the recipient should check this email and any attachments for the presence of viruses. The Company accepts no liability for any damage caused by any virus transmitted by this email. All SGS services are rendered in accordance with the applicable SGS conditions of service available on request and accessible at https://www.sgs.com/en/terms-and-conditions
@wknsJimmy thanks for the details.
In the above message looks like image you shared for question-3 dotnet version did not come through. Can you please share the dotnet sdk version on your machine again.
I tried reproing this with a few databases on our side but could not get the error so far. Is it possible for you to share the project or just the sqlproj file with us?
Looks the same problem in v0.6.1 version of SQL Datababase Project: [ Build ]
"C:\Program Files\dotnet\dotnet.exe" build "c:\TMP\TSQLV5\TSQLV5.sqlproj" /p:NetCoreBuild=true /p:NETCoreTargetsPath="c:\Users\Karol\.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory" stdout: Microsoft (R) Build Engine version 15.9.20+g88f5fadfbe for .NET Core stdout: Copyright (C) Microsoft Corporation. All rights reserved. stdout: stdout: stdout: Restore completed in 54,92 ms for c:\TMP\TSQLV5\TSQLV5.sqlproj. stdout: stdout: Creating a model to represent the project... stdout: stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: The "SqlBuildTask" task failed unexpectedly. [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: System.TypeInitializationException: The type initializer for 'SqlSchemaModelStaticState' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.2.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified. [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.RegisterImplementationForSqlModelImpl(ModelSchema storeSchema) [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.SqlSchemaModelStaticState.RegisterModelSchema() [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel.SqlSchemaModelStaticState..cctor() [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: --- End of inner exception stack trace --- [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModel..ctor(SqlDatabaseSchemaProvider databaseSchemaProvider, SqlPlatforms platform, ModelCollation collation, String modelFileName, ErrorManager errorManager, Boolean validationEnabled, Boolean initializeBuiltIns, Boolean validateCasingOnIdentifiers, Boolean convertCrossDbRefToWarning, Boolean isMsdb, ModelStorageType modelStorageType, Boolean storeSourceCodePositionAnnotations) [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Data.Tools.Schema.Sql.SchemaModel.SqlSchemaModelConstructor.ConstructServiceImplementation() [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.CreateDataSchemaModel() [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.LoadImpl(ITaskHost providedHost, TaskLoggingHelper providedLogger) [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Data.Tools.Schema.Tasks.Sql.TaskHostLoader.Load(ITaskHost providedHost, TaskLoggingHelper providedLogger) [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteLoadTaskHostStep() [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.ExecuteStep(Func`1 step) [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Data.Tools.Schema.Tasks.Sql.SqlBuildTask.Execute() [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: c:\Users\Karol.azuredatastudio\extensions\microsoft.sql-database-projects-0.6.1\BuildDirectory\Microsoft.Data.Tools.Schema.SqlTasks.targets(586,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask(ITaskExecutionHost taskExecutionHost, TaskLoggingContext taskLoggingContext, TaskHost taskHost, ItemBucket bucket, TaskExecutionMode howToExecuteTask) [c:\TMP\TSQLV5\TSQLV5.sqlproj] stdout: stdout: stdout: Build FAILED.
@wknsJimmy thanks for the details.
In the above message looks like image you shared for question-3 dotnet version did not come through. Can you please share the dotnet sdk version on your machine again.
I tried reproing this with a few databases on our side but could not get the error so far. Is it possible for you to share the project or just the sqlproj file with us?
@wknsJimmy thanks for the details.
In the above message looks like image you shared for question-3 dotnet version did not come through. Can you please share the dotnet sdk version on your machine again.
I tried reproing this with a few databases on our side but could not get the error so far. Is it possible for you to share the project or just the sqlproj file with us?
The version of dotnet is as follows:
2.1.202 [C:\Program Files\dotnet\sdk] 2.1.403 [C:\Program Files\dotnet\sdk] 2.1.520 [C:\Program Files\dotnet\sdk]
And here is the content of the sqlproj file
<?xml version="1.0" encoding="utf-8"?>
Here is the sqlproj file with the extension changed to txt
@wknsJimmy - I had the same problem you did. Missing System.Runtime is seems fundamentally off.
I had Visual Studio 2017 Pro with dotnet core 2.1 (no other dotnet core runtimes/sdks)
On a hunch I went ahead and installed a more recent version of dotnet core (requires visual studio 2019)
The build feature in Azure Data Studio works now
@supamii - I have VS 2017, VS 2019 and .NET SDK 2.1.521 installed, still the problem persists ...
If you're looking to unblock yourself, try to install dotnet3.x
Installing dotnet 3.x doesn't help, the same error again.
Hi @wknsJimmy,
[updating the investigation below]
I was able to repro this using lower 2.x version of dotnet core SDK just now. So it seems the issue is that the machine has a lower version of dotnet SDK. Can you please check that you have dotnet core SDK 3.1 or higher installed and System.Runtime present on the machine
Paths to check
If the folder seems incomplete please install from https://dotnet.microsoft.com/download/dotnet/3.1
I have also opened a tracking item for a better error in these cases. Hopefully that helps.
I'm seeing a similar error appearing out of the blue after an update to the SQL Database Project extension 0.14.1 (which fixed another bug) with either of the following:
.NET 3.1.416 .NET 6.0.101
ADS: 1.34.0 (user setup)
is there a way to rollback the extension to something before 0.14.1 in order to debug?
edit: the build works fine in VS 2017 edit: installed VS 2019 and try to open the project which threw the same exception as the ADS build but with the crucial addition of telling which file caused the build error. The file in question (sql) has been unchanged throughout previous succesful builds.
@adriennn You can download previous versions of the extension by replacing the ##.##.## with the version you want in this URL : https://sqlopsextensions.blob.core.windows.net/extensions/sql-database-projects/sql-database-projects-##.##.##.vsix
SQL Database Projects extension version: 0.5.1
Steps to Reproduce:
1.Connect to an existing database 2.Use the Create Project from Database option 3.Confirm the scripts for each object exist in the Project folders 4.Right click on the Project name and choose Build
5.Partial Build output window is as follows:
Clicking on the link to the "Not found" file says "Unable to resolve non-existing file 'c:\Users\Jimmy_Blacksmith\source\repos\HKTest\ADSInsideRepo\SIRDev\SIRDev.sqlproj]' Note the closing square bracket
Confirmed that the .sqlproj file does actually exist in that location