Visual Studio Code won't compile or submit USQL script - azure

I am using Visual Studio Code (VS Code) to compile and then submit usql scripts on our Azure platform.
Something happend and I cannot compile or submit any usql jobs anymore, with following error message:
I tried multiple solutions to fix it:
Reinstall visual studio code
Updated to the latest version (1.38)
Reinstall the Azure Data Lake Tools package
Remove all generated folders and files and start from scratch
I made sure this is not access-related (I can run jobs on Azure web portal)
The script does not have any bugs and it is supposed to run (checked on Azure web portal)
I work on MS Windows VM x64, VS Code version 1.38.
I am completely puzzled by that, any help greatly appreciated!

I can't reproduce your issue on my side. I follow steps in this detailed guide and it works well for me.
Since you already sorted out several possible issues, I would suggest you checking if you missed some installations follow above link. In particular, the following steps:
2.1 To install BuildTools, click visualcppbuildtools_full.exe in the LocalRunDependency folder, then follow the wizard instructions.
2.2 To install Win10SDK 10240, click sdksetup.exe in the LocalRunDependency/Win10SDK_10.0.10240_2 folder, then follow the
wizard instructions.
And and run ADL: Start Local Run Service.
Just for summary, it works after updating sdk version to 1.38.1.

Related

Microsoft.SqlServer.Types: Are native libries for SQL Server preinstalled on Azure?

I just upgraded my app to use the latest Microsoft.SqlServer.Types package v14 from v13. This resulted in an well-documented runtime error. The reason here would be missing native libraries:
Spatial types and functions are not available for this provider because the assembly 'Microsoft.SqlServer.Types' version 10 or higher could not be found
The Nuget package also contains the native DLLs that were missing, so I could theoretically copy them to my bin folder and load them through my code, but:
I didn't have to do that with my v13 binaries
When I deployed the updated project to Azure, it ran just fine.
My current assumption would be that I got the v13 binaries with my local SQL install, and on Azure, those binaries (both v13 / v14) are preinstalled.
However, when googling a bit about the issue, most developers have the opposite problem of things not working on Azure due to the missing libs, so I wonder whether not going the manual route might be dangerous with regards to Azure deployments. If anybody had some insight here, that would be awesome!
As far as I know, the azure web service install the SQL server SDK version is 9.0 - 13.0. So you need install 14.0 by yourself.
You could find the dll in the kudu console in your web service.
D:\Program Files (x86)\Microsoft SQL Server\130\SDK\Assemblies>
To open the kudu you could refer to below steps:
1.Find the Advanced Tools in DEVELOPMENT TOOLS click go.
2.Click dubug console's cmd.
3.Find the path.
Notice: You need firstly type cd.. to locate the root path.
You could find the Microsoft.SqlServer file as below:

How to use https://github.com/Azure/azure-powershell source code?

I am new to Windows powershell and Visual Studio. I followed the azure developer guide on github(https://github.com/Azure/azure-powershell/wiki/Microsoft-Azure-PowerShell-Developer-Guide) till the "Build Solution .Execute tools\Build.ps1" step. Build is failing with 802 errors. How to import the project into visual studio and run the samples? What project is it actually? C# or VB or it just contains cmdlets and sample tests?
There are two parts to the Azure Powershell repository.
Firstly there is the source code, unless you're a developer, or are interested in the inner workings of Azure Powershell, this probably isn't what you are looking for (my apologies if it is!)
As a general overview though, the Build.ps1 configures your machine to build the Azure Powershell cmdlets. The source code is c# and is located here Build.ps1 installs the following -
Install Windows Azure SDK
Install Python 2.7 x86
Install Django
Install Wix 3.8
Make sure that git.exe and wix bin folder are in you PATH environment variable.
Set environment variable EnableNuGetPackageRestore to value true
if you do those things manually, you can then load the project into Visual Studio and compile the cmdlets.
However, the second purpose of that repository is what I suspect you are actually looking for. If you look here you will find the releases of the installers that you can download to install Azure Powershell. Once these are installed on your machine you can browse and configure Azure services via Powershell.
For instance for version 1.0.1 you will find the download for the latest version of Azure Powershell (at the time of writing anyway!)
If you are just looking to learn Powershell and Azure then that is probably the place you want to start.
If you are looking to explore the source code, then that is there also.

How to properly create an Alea GPU project? Errors on "Getting Started" code

I have done the following to create an Alea GPU project in Visual Studio 2012 Professional:
File > New > Project > F# Application
Updated NuGet Package Manager to latest version
Tools > NuGet Package Manager > Console
PM> Install-Package Alea.CUDA
PM> Install-Package Alea.CUDA.IL
Installed license using these instructions: http://quantalea.com/static/app/tutorial%5Cgetting_started%5Cinstall_license.html
Copied the code from here https://github.com/quantalea/AleaGPUTutorial/blob/master/src/fsharp/getting_started/ParallelSquare.fs into my main project file.
Build Solution.
I get the following errors:
The lines numbers and file from the GitHub link above correspond with each other.
I'm new to using Alea GPU, Visual Studio, and F#. I've tried doing what I could with the resources I have available. Although the the Alea GPU website explains what to do (install Alea through NuGet, install license, provides code, etc.) it might be targeted to users who have experience working with Visual Studio. It's also worth mentioning I have CUDA drivers installed on this machine.
I have also followed the instructions on this page, but it seems like it's still under construction: http://quantalea.com/static/app/tutorial%5Cgetting_started%5Ccreate_new_project.html. I'm not using Fody since I won't be using C#.
Thanks for reporting the web site problem. Yes, our document are under constructing. I tried your steps and I figured out how to do it correctly, which I will show you later. The issues you met are mainly because:
You are using VS2012, which by default referencing FSharp 3.0, which is a little out-of-date, we suggest to use FSharp 3.1
You forget to reference other assemblies which is used in the code, such as NUnit and FSharp.Charting
Alea.CUDA.Fody doesn't means to work with C#, it means to do AOT compile on GPU code. It uses Fody plugin to compile GPU code during MSBuild process, so your appliction doesn't need to compile GPU code in runtime.
Now, here are the steps:
Open VS 2012, upgrade nuget plugin, then new F# console application project
Expand "References" in solution explorer, and remove the FSharp.Core reference (since it is FSharp 3.0, we will replace it with new 3.1)
Go to "Package Manager Console", install some nuget packages which is used in the code:
Install-Package FSharp.Core
Install-Package FSharp.Charting
Install-Package NUnit
Now we will install Alea.CUDA.Fody (which will install Alea.CUDA by dependency). But since Fody plugin has to run some powershell script to create an FodyWeavers.xml file to configure Fody usage, and this script doesn't work well with F# project (it works with C# project). The workaround is simple, just click "save all" in VS2012 before you run Install-Package Alea.CUDA.Fody. You will see some red error in the package manager console, that is fine, it is just the Fody plugin's script doesn't work well with F# project. You can safely ignore it. After install Alea.CUDA.Fody, a file FodyWeavers.xml file will be added to your project, there you can configure how you will do the AOT compilation. I suggest you add a setting to show verbose information: <Alea.CUDA Verbose="true"/>
Now you need add some common references, since the package FSharp.Charting uses them. To do that, right click your "References" in solution explorer, and choose "Add Reference...", under "Assemblies" -> "Framework", select these assemblies:
System.Drawing
System.Windows.Forms
System.Windows.Forms.DataVisualization
Now your project is set. Please Change the building configuration to "Release".
Now let's add the source file. First right click Program.fs in solution explorer, and select "Add above" -> "New Item...", select F# source file, name it ParallelSquare.fs
Copy https://github.com/quantalea/AleaGPUTutorial/blob/master/src/fsharp/getting_started/ParallelSquare.fs into that new created file
You need modify one place: https://github.com/quantalea/AleaGPUTutorial/blob/master/src/fsharp/getting_started/ParallelSquare.fs#L139 , change this to WorkerExtension.Launch(worker, <# squareKernel #>) lp dOutputs.Ptr dInputs.Ptr inputs.Length , the reason is, the Launch method is an extension method, which the FSharp compiler in VS 2012 doesn't support it well, so we call that extension method directly (So I suggest you to use VS 2013).
Now in your Program.fs file, call the test in main function: Tutorial.Fs.quickStart.ParallelSquare.squareChart(). and then you can press "F5" to run it.
After this, I suggest you read http://quantalea.com/static/app/manual/compilation-index.html where explains the intallation, the AOT vs JIT compilation, etc.

create azure package with build

I was just upgrading my project from sdk 1.3 to 1.7 and I noticed that now when I build the application the package(cspkg) is not created with the build. I have go click on publish to create a package. Is there a way to tell VS to create a package everytime a build is triggered.
Also using msbuild is there a way to do the same thing. I have multiple projects under a solution, Most of which are just libraries and then there is this azure app. Is there a way to specify a single msbuild statement with params to tell the azure app to create the package as well as build the other projects. Also when I specify debug the debug package should be created and when I specify release switch the release package should be created.
How could I do the same thing on my build server as well where I have a .proj file which specifies the sln to build. How could I mention a switch to build the package there.
Thanks,
Kunal
You can configure CSPACK command (Be sure to have CSPACK.exe launched from SDK 1.7 Path otherwise you will get some schema related errors with SDK 1.6 project) as Post Build event in your Windows Azure Application Build settings. This way when you will build, after successful build CSPACK command will run and package your application. Same way you can configure your MSBuild configuration. I just tested and it worked for me.
Visit this MSDN article on packaging a cloud service to learn more.
You can do this using msbuild as well. See the Resolution section of this question.

What makes deployment successful for some users and unsuccessful for others?

I am trying to deploy a Visual C++ application (developed with Microsoft Visual Studio 2008) using a Setup and Deployment Project. After installation, users on some target computers get the following error message after launching the application executable: “This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem.” Another user after installation could run the application properly. I cannot find the root cause of this problem, despite spending several hours on the Visual Studio help files and online forums (most postings date back to 2006). Does anyone at Stack Overflow have a suggestion? Thanks in advance. Additional details appear below.
The application uses FLTK 1.1.9 for a GUI library, as well as some Boost 1.39 libraries (regex, lexical_cast, date_time, math).
I made sure I am trying to deploy the release version (not the debug version) of the application. The Runtime library in the Code Generation settings is Multi-threaded DLL (/MD).
The dependency walker of myapp.exe lists the following DLLs: wsock32.dll, comctl32.dll, kernel32.dll, user32.dll, gdi32.dll, shell32.dll, ole32.dll, mvcp90.dll, msvcr90.dll.
In the Setup and Deployment Project, I add the following DLLs to the File System on Target Machine: fltkdlld.dll, and a folder named Microsoft.VC90.CRT with msvcm90.dll, msvcp90.dll, mcvcr90.dll and Microsoft.VC90.CRT.manifest.
The installation process on the target computers getting the error message requires having the .Net Framework 3.5 installed first.
Any suggestion? Thanks in advance!
Add the Visual C++ Redistributable to your Deployment project and be sure to run Setup.exe instead of the MSI when installing. This will invoke the VCRedist bootstrapper to ensure your PC has those pieces before installing your app.
Dependency Walker only shows static (link time) dependencies - it cannot possibly know about dynamic dependencies such as COM objects.
I had a similar problem after the ATL security updates last year. My app needed a later version of the C++ runtime libraries than the deployment project included.
Try running Windows Update on the target machines after installation, or download and install the latest (28 July 2009) C++ redistributable package directly.
http://support.microsoft.com/?kbid=973551
That solved the problem for me. I haven't fixed the deployment project yet though.

Resources