Stairway to SQLCLR Level 7: Development and Security

  • The problem is resolved. Kaspersky anti-virus protection was to blame.

    Solomon, can you help me?

    I had a problem at level 7 after step 66.

    I am using VS community 2017 as an administrator (SQL Server 2016, .NET Framework 2.0) on a Windows 7 Pro SP1 virtual machine.

    I save AssemblySecuritySetup-Part1of2.sql and AssemblySecuritySetup-Part2of2.sql with Win-1251 encoding and ending line with CR+LF (1252 automatically converted to 1251 when saving). All windows in VS are closed. Files are not marked “read-only”, although the folder containing them has the attribute “read-only (applies only to files in the folder)”, which cannot be changed (changes are not saved).

    Added:

    All pre & post-build event command are perfectly executed from the command line with or without administrator privileges.

    I don’t know if all this is important. But, when I create the KeyInfo assembly, the post-build event command cannot access AssemblySecuritySetup-Part1of2.sql.

    Sorry for my English. Here is a google translation of the outgoing message from Russian:

    ------ Build started: project: KeyInfo, Configuration: Debug Any CPU ------

    CD / D "C: \ temp \ StairwayToSQLCLR \ Level-06 \ StairwayToSQLCLR-06_ConnectionTypeTest \ KeyInfo \ bin \ Debug \"

    IF EXIST "_TempAssembly.sql" DEL / F / Q "_TempAssembly.sql"

    C: \ Program Files (x86) \ Microsoft Visual Studio \ 2017 \ Community \ MSBuild \ 15.0 \ Bin \ Roslyn \ csc.exe / noconfig / nowarn: 1701,1702,2008 / nostdlib + / errorreport: prompt / warn: 4 / define : DEBUG; TRACE / errorendlocation / preferreduilang: ru-RU / highentropyva- /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll / reference: C: \ Windows \ Microsoft.NET \ Framework \ v2.0.50727 \ System.Data.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /reference:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System. Xml.dll / debug + / debug: full / keycontainer: VS_KEY_62965465D2A27825 / optimize- /out:obj\Debug\KeyInfo.dll / ruleset: "C: \ Program Files (x86) \ Microsoft Visual Studio \ 2017 \ Community \ Team Tools \ Static Analysis Tools \\ Rule Sets \ MinimumRecommendedRules.ruleset "/ target: library / warnaserror- / utf8output OnlyNeededToGenerateCreateAssembly.cs Properties \ AssemblyInfo.cs" C: \ Users \ khmelnik_m \ AppData \ Local \ Temp \ .NETFramework, Version = v2. 0.SqlClrAttributes.cs "

    Loading project links ...

    Loading project files ...

    The construction of the project model and the resolution of the interdependencies between the objects are carried out ...

    Checking the project model ...

    The model is being written to C: \ temp \ StairwayToSQLCLR \ Level-06 \ StairwayToSQLCLR-06_ConnectionTypeTest \ KeyInfo \ obj \ Debug \ Model.xml ...

    Writing a creation script in KeyInfo_Create.sql ...

    KeyInfo -> C: \ temp \ StairwayToSQLCLR \ Level-06 \ StairwayToSQLCLR-06_ConnectionTypeTest \ KeyInfo \ bin \ Debug \ KeyInfo.dll

    KeyInfo -> C: \ temp \ StairwayToSQLCLR \ Level-06 \ StairwayToSQLCLR-06_ConnectionTypeTest \ KeyInfo \ bin \ Debug \ KeyInfo.dacpac

    CD / D "C: \ temp \ StairwayToSQLCLR \ Level-06 \ StairwayToSQLCLR-06_ConnectionTypeTest \ KeyInfo \ bin \ Debug \"

    FINDSTR / I / C: "FROM 0x" KeyInfo_Create.sql> _TempAssembly.sql

    COPY / V / Y / B "C: \ temp \ StairwayToSQLCLR \ Level-06 \ StairwayToSQLCLR-06_ConnectionTypeTest \ KeyInfo \ AssemblySecuritySetup-Part1of2.sql" + _TempAssembly.sql + "C: \ temp \ StairwayRTLQ-06 06_ConnectionTypeTest \ KeyInfo \ AssemblySecuritySetup-Part2of2.sql "" C: \ temp \ StairwayToSQLCLR \ Level-06 \ StairwayToSQLCLR-06_ConnectionTypeTest \ AssemblySecuritySetup.sql "

    Access denied.

    C: \ temp \ StairwayToSQLCLR \ Level-06 \ StairwayToSQLCLR-06_ConnectionTypeTest \ KeyInfo \ AssemblySecuritySetup-Part1of2.sql

    Access denied.

    Copied files: 0.

    C: \ Program Files (x86) \ Microsoft Visual Studio \ 2017 \ Community \ MSBuild \ 15.0 \ Bin \ Microsoft.Common.CurrentVersion.targets (5165.5): Error: MSB3073: exiting the "CD / D" command C: \ temp \ StairwayToSQLCLR \ Level-06 \ StairwayToSQLCLR-06_ConnectionTypeTest \ KeyInfo \ bin \ Debug \ "

    FINDSTR / I / C: "FROM 0x" KeyInfo_Create.sql> _TempAssembly.sql

    COPY / V / Y / B "C: \ temp \ StairwayToSQLCLR \ Level-06 \ StairwayToSQLCLR-06_ConnectionTypeTest \ KeyInfo \ AssemblySecuritySetup-Part1of2.sql" + _TempAssembly.sql + "C: \ temp \ StairwayRTLQ-06 06_ConnectionTypeTest \ KeyInfo \ AssemblySecuritySetup-Part2of2.sql "" C: \ temp \ StairwayToSQLCLR \ Level-06 \ StairwayToSQLCLR-06_ConnectionTypeTest \ AssemblySecuritySetup.sql "

    "with code 1.

    The assembly of the project "KeyInfo.sqlproj" completed with an error.

    Build error.

    ========== Build: successfully and without changes: 0, with errors: 1, missing: 0 ==========

    • This reply was modified 4 years, 7 months ago by  kh53dBmM.
    • This reply was modified 4 years, 7 months ago by  kh53dBmM.

Viewing post 16 (of 15 total)

You must be logged in to reply to this topic. Login to reply