microsoft / dotnet-framework-docker

The repo for the official docker images for .NET Framework on Windows Server Core.
https://hub.docker.com/_/microsoft-dotnet-framework
MIT License
708 stars 335 forks source link

SSDT build issues with devenv against *dtproj #311

Closed sylus closed 5 years ago

sylus commented 5 years ago

Hi there I am attempting to build a few visual studio solutions that have corresponding "*.dtproj" files. I can get this to work outside of 4.8--servercore but can't seem to get this to work inside the container even though think I have all the dependencies.

This is roughly what my container layers look like:

FROM mcr.microsoft.com/dotnet/framework/sdk:4.8-20190611-windowsservercore-1803

...

# oledlg.dll
COPY Windows/ Windows

# Core Deps
RUN choco install -v -y jdk8 `
                        git `
                        nuget.commandline `
                        docker-cli `
                        docker-compose

# Add Git Targets
RUN setx /M PATH $($Env:PATH + ';' + 'C:\Program Files\Git\usr\bin')

# Extra Deps
RUN choco install -v -y groovy `
                        kubernetes-helm `
                        msdeploy3 `
                        nodejs `
                        yarn `
                        octopustools `
                        sqlserver-cmdlineutils `
                        sonarscanner-msbuild-netcoreapp2.0

# AZ preference over azurepowershell
RUN Install-PackageProvider Nuget –Force; `
   Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted; `
   Install-Module -Name Az; `
   Enable-AzureRmAlias -Scope CurrentUser

# Path
ENV TargetFrameworkSDKToolsDirectory 'C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools'

# WCF Targets
ADD ["BuildTools/", "C:/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools"]

# Add Microsoft.Web.Administration libraries
RUN Add-WindowsFeature Web-Scripting-Tools

# Add Crystal Report assemblies
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
    Invoke-WebRequest "https://downloads.businessobjects.com/akdlm/crnetruntime/clickonce/CRRuntime_64bit_13_0_23.msi" -OutFile CRRuntime_64bit_13_0_23a.msi -UseBasicParsing; `
    Start-Process msiexec.exe -ArgumentList '/I "CRRuntime_64bit_13_0_23a.msi" /qn' -Wait ; `
    Remove-Item "CRRuntime_64bit_13_0_23a.msi" -Force

# SQL Tools
RUN choco install -y visualstudio2019community --version 16.1.2.0
RUN choco install -y visualstudio2019-workload-data --version 1.0.0
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
    Invoke-WebRequest "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/SSIS/vsextensions/SqlServerIntegrationServicesProjects/3.0/vspackage" -OutFile SSIS.exe -UseBasicParsing; `
    Start-Process .\SSIS.exe -ArgumentList '/S /v/qn' -Wait ; `
    Remove-Item .\SSIS.exe -Force
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; `
    Invoke-WebRequest "ftp://support.red-gate.com/patches/SQLToolbelt/14May2019/SQLToolbelt.exe" -OutFile SQLToolbelt.exe -UseBasicParsing; `
    Start-Process .\SQLToolbelt.exe -ArgumentList 'products "SQL Change Automation" /IAgreeToTheEULA' -Wait ; `
    Remove-Item .\SQLToolbelt.exe -Force

I was told to maybe add but can't see why they are needed given i installed SSIS successfully above.

RUN choco install -v -y visualstudio2019sql-preview --pre
choco install ssis-vs2019 --version 3.0.0.20190622 --pre

Could anyone provide some assistance on maybe what I am doing wrong?

When compiling with the below I just get project type for *.dtproj is not found.

& 'C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\devenv.com' .\PaySSISPackage.sln /rebuild "Development"
C:\workspace\Pay\SSISPackages\UpgradeLog.htm
========== Rebuild All: 0 succeeded, 0 failed, 0 skipped ==========
sylus commented 5 years ago

upgradelog.txt

sylus commented 5 years ago

@MichaelSimons was wondering if you had any idea. I'd greatly appreciate any advice and hope this message catches you well :)

sylus commented 5 years ago

https://github.com/MicrosoftDocs/visualstudio-docs/issues/2592 https://github.com/microsoft/azure-pipelines-tasks/issues/5063

MichaelSimons commented 5 years ago

@sylus - I apologize that I don't know how to get this installed. You might have better luck getting a good answer on StackOverflow where the audience is much larger.

Closing as this is not something we would add to the SDK image.

sylus commented 5 years ago

https://github.com/MicrosoftDocs/visualstudio-docs/issues/3598