New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow external Nuget if already in path? #38
Comments
Yes, the system/user environment variable for path. I may have some workarounds for this, but seem to be having some other issues w/ the ".targets" file now in the installed dacfx - similar to this issue: https://developercommunity.visualstudio.com/content/problem/166536/ssdt-not-present-in-visual-studio-build-tools-2017.html
So either need to use the on-board bits properly, but not finding that "Microsoft.Data.Tools.Schema.SqlTasks.targets" file, or see if the nuget exe in the system path will work to pull in a local DacFX that I can use. Still not sure if that will work, but if it does, it would definitely be easier. Reading through the above thread, it seems that a _lot_ of people are having issues w/ trying to use an installed set of SSDT tools. 🙁
Not said often enough, but I really do appreciate the help.
…-Peter Schott
________________________________
From: Richie Lee <notifications@github.com>
Sent: Wednesday, September 26, 2018 5:13 AM
To: RichieBzzzt/PoshSSDTBuildDeploy
Cc: Peter Schott; Author
Subject: Re: [RichieBzzzt/PoshSSDTBuildDeploy] Allow external Nuget if already in path? (#38)
You mentioned system path but just to confirm: the path stored as a system environment variable?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRichieBzzzt%2FPoshSSDTBuildDeploy%2Fissues%2F38%23issuecomment-424661772&data=02%7C01%7C%7Cb5bf5dba043d4d24480408d62398c13c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636735536308407073&sdata=pTParKxrWN6qZTrvFwD5DNaAOO2xXsSOuqOM1Mes2lA%3D&reserved=0>, or mute the thread<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAU0dwFToqGAmZ9DAFppEjEkyyZPqL2uks5ue1NbgaJpZM4W5ekU&data=02%7C01%7C%7Cb5bf5dba043d4d24480408d62398c13c%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636735536308407073&sdata=fetxy3avLSt%2Bd7USPR6aAiOclQfPvILdcxLh76RD%2BHQ%3D&reserved=0>.
|
Ok this is 2 separate things:
You may need to open up your sqlproj file and do some editing: altering where it finds the .targets file. This is form a recent project. Is your database project particularly old? Older projects don't work well with the Microsoft.Data.Tools.MSBuild because the path was different. <PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
<!-- Default to the v11.0 targets path if the targets file for the current VS version is not found -->
<SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists>
<VisualStudioVersion Condition="'$(SSDTExists)' == ''">11.0</VisualStudioVersion>
</PropertyGroup>
<Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
<Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" /> The targets file is by defauly packaged in the Microsoft.Data.Tools.MSBuild nuget package, hence why it is used when building a project - |
I understand that it's two different things. I modified my code to not try to use nuget and instead point the $dacfxpath to wherever it was on the server already. That resulted in the error.
This is a new project - at least within the last 6 months or so. I was playing around with Adventureworks for a demo so created a new project in VS2017 based on that.
Hoping that getting nuget to work from the path will maybe let me pull the dacfx locally so I can just use the bits there instead of hoping that everything lines up. I'd really like to avoid modifying each project and then every new project to try to point to the proper .targets file. 🙁 (sent a note to Andy Yu to that effect and hoping it can be passed up the chain to whoever's in charge of the dacfx installs - different paths depending on VS edition is a killer)
Thanks again.
-Peter
…________________________________
From: Richie Lee <notifications@github.com>
Sent: Wednesday, September 26, 2018 8:55 AM
To: RichieBzzzt/PoshSSDTBuildDeploy
Cc: Peter Schott; Author
Subject: Re: [RichieBzzzt/PoshSSDTBuildDeploy] Allow external Nuget if already in path? (#38)
Ok this is 2 separate things:
1. w/r/t nuget in environment path var - this is doable. Had a little play around earlier in PowerShell. I'd need to write a new function and test, so I reckon I can get this done, maybe tomorrow evening.
2)check your sqlproj file. Read this post
https://bzzzt.io/post/2016-03-08-how-to-compile-sqlproj-files-using-cmdline-msbuild----errors-included-/<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbzzzt.io%2Fpost%2F2016-03-08-how-to-compile-sqlproj-files-using-cmdline-msbuild----errors-included-%2F&data=02%7C01%7C%7Cc6925372d175443e9f4e08d623b7bd09%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636735669385772613&sdata=3OydBBYRDjyaGXDGiwOFV%2FbXPZR4ryAkSH8NUakCOJo%3D&reserved=0>
You may need to open up your sqlproj file and do some editing: altering where it finds the .targets file. This is form a recent project. Is your database project particularly old? Older projects don't work well with the Microsoft.Data.Tools.MSBuild because the path was different.
<PropertyGroup>
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
<!-- Default to the v11.0 targets path if the targets file for the current VS version is not found -->
<SSDTExists Condition="Exists('$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets')">True</SSDTExists>
<VisualStudioVersion Condition="'$(SSDTExists)' == ''">11.0</VisualStudioVersion>
</PropertyGroup>
<Import Condition="'$(SQLDBExtensionsRefPath)' != ''" Project="$(SQLDBExtensionsRefPath)\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
<Import Condition="'$(SQLDBExtensionsRefPath)' == ''" Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
The targets file is by defauly packaged in the Microsoft.Data.Tools.MSBuild nuget package, hence why it is used when building a project -
https://github.com/RichieBzzzt/PoshSSDTBuildDeploy/blob/master/PoshSSDTBuildDeploy/Functions/InvokeMSBuildSSDT.ps1#L38<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRichieBzzzt%2FPoshSSDTBuildDeploy%2Fblob%2Fmaster%2FPoshSSDTBuildDeploy%2FFunctions%2FInvokeMSBuildSSDT.ps1%23L38&data=02%7C01%7C%7Cc6925372d175443e9f4e08d623b7bd09%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636735669385772613&sdata=1%2Fqm3WEp4LcEgZ4%2FfbbBuBMouKctDTX0XnIvTTvcShQ%3D&reserved=0>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRichieBzzzt%2FPoshSSDTBuildDeploy%2Fissues%2F38%23issuecomment-424724311&data=02%7C01%7C%7Cc6925372d175443e9f4e08d623b7bd09%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636735669385772613&sdata=tdhEyvalxKYlZemYURkiGK328f4Xu7w76NtaEnWPEyQ%3D&reserved=0>, or mute the thread<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAU0d1Dyokjrx_OI5WUSgBAlcm4kIbjRks5ue4dYgaJpZM4W5ekU&data=02%7C01%7C%7Cc6925372d175443e9f4e08d623b7bd09%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636735669385772613&sdata=6oXNUu05IFAuOC7EtyhTZ%2BsVfzt7oD%2FGhDStdeRBgI4%3D&reserved=0>.
|
No worries. Once the new function is in you won't need to download nuget from the web. BTW, how will you download msbuild.data.tools if you have no internet connection? Or is it just no connection to download nuget? |
Nuget is already installed so I get an error trying to install it again. Then when it tries to run Nuget from the local path, the process fails because it couldn't download it. I have internet access - just not to install nuget.
…________________________________
From: Richie Lee <notifications@github.com>
Sent: Wednesday, September 26, 2018 9:12 AM
To: RichieBzzzt/PoshSSDTBuildDeploy
Cc: Peter Schott; Author
Subject: Re: [RichieBzzzt/PoshSSDTBuildDeploy] Allow external Nuget if already in path? (#38)
No worries. Once the new function is in you won't need to download nuget from the web.
BTW, how will you download msbuild.data.tools if you have no internet connection? Or is it just no connection to download nuget?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRichieBzzzt%2FPoshSSDTBuildDeploy%2Fissues%2F38%23issuecomment-424730692&data=02%7C01%7C%7Ce5ff7d984bd042e27be808d623ba1ed8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636735679611577294&sdata=RTUgy7crK0%2FYG9XYrtoUkjQeat%2FTUJDtrIstuz8g8yU%3D&reserved=0>, or mute the thread<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAU0d8nS4JyUhxzGCaNm01qJISKt_AVRks5ue4tUgaJpZM4W5ekU&data=02%7C01%7C%7Ce5ff7d984bd042e27be808d623ba1ed8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636735679611577294&sdata=FsEtxRbc0NDy8t66yfN3X9a7MtJpQq8mbRAb8wyU%2B2U%3D&reserved=0>.
|
OK gotcha no worries. |
Ok I’ve made a start and checked in a branch with a quick change to allow path to nuget to be added. But now my daughter’s sick and my tests are failing so I won’t get to finish tonight! 2nd phase is to add a switch to check user/system path, but am worried that might end up a bit flakey. Time will tell...... Hopefully over the weekend I can steal some time to complete. |
I appreciate the time, but please take care of yourself and your family. That's far more important than this.
I have to pause on this for some other higher priority tasks for the moment, but hope to resume a little more next week. It's already gotten a much better/easier build than I was using a couple of years ago so I'm grateful for that.
…-Peter
________________________________
From: Richie Lee <notifications@github.com>
Sent: Thursday, September 27, 2018 4:17 PM
To: RichieBzzzt/PoshSSDTBuildDeploy
Cc: Peter Schott; Author
Subject: Re: [RichieBzzzt/PoshSSDTBuildDeploy] Allow external Nuget if already in path? (#38)
Ok I’ve made a start and checked in a branch with a quick change to allow path to nuget to be added. But now my daughter’s sick and my tests are failing so I won’t get to finish tonight!
2nd phase is to add a switch to check user/system path, but am worried that might end up a bit flakey. Time will tell......
Hopefully over the weekend I can steal some time to complete.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRichieBzzzt%2FPoshSSDTBuildDeploy%2Fissues%2F38%23issuecomment-425246088&data=02%7C01%7C%7C5739125de7cd41d9fb0208d624be9105%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636736798220130854&sdata=BsB%2F5f2MO0kmTdBMY8%2Bcm3uQJd%2FWG5YogcH%2FuGzV%2FwI%3D&reserved=0>, or mute the thread<https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAU0d-mSQvJHHJ3nRNf4BIqSgx7T7HOUks5ufUBMgaJpZM4W5ekU&data=02%7C01%7C%7C5739125de7cd41d9fb0208d624be9105%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636736798220130854&sdata=V7sc3Uvj3JdBuD7ebEYiYYhpG4R8PUNJa4YT1g8F7Vw%3D&reserved=0>.
|
OK ability to specify nuget location added and merged in and latest available on GitHub/NuGet. PowerShell Gallery is proving impossible to update, due to it whinging about something. Now available on PSGallery. |
Thanks. Looks like the latest version is there, but our target paths have spaces in them so I think the nuget exe is complaining about the spaces. The "output directory" probably needs to handled double quotes around that path unless I'm missing it somewhere.
Other than that it seems to work. 😊
…-Peter
________________________________
From: Richie Lee <notifications@github.com>
Sent: Sunday, September 30, 2018 3:18 PM
To: RichieBzzzt/PoshSSDTBuildDeploy
Cc: Peter Schott; Author
Subject: Re: [RichieBzzzt/PoshSSDTBuildDeploy] Allow external Nuget if already in path? (#38)
OK ability to specify nuget location added and merged in and latest available on GitHub/NuGet. PowerShell Gallery is proving impossible to update, due to it whinging about something.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FRichieBzzzt%2FPoshSSDTBuildDeploy%2Fissues%2F38%23issuecomment-425748701&data=02%7C01%7C%7C78ec442c0ced407eee9708d62711e0b3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636739355061291401&sdata=PMOxbF2KZFPfL4ftjPnc3nYrSUkDOfX3WFLdiygVDk4%3D&reserved=0>, or mute the thread<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAAU0dzEKKuLn3Js3dFWua4cRxHTYVA5Fks5ugScPgaJpZM4W5ekU&data=02%7C01%7C%7C78ec442c0ced407eee9708d62711e0b3%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636739355061291401&sdata=QwjAqykOPj4cqHq9YVRevjlKIlxjyBJXlO49vbzI2FU%3D&reserved=0>.
|
Closed as of #40 |
We have a deployment server that's locked down to prevent downloading a copy of nuget to the working path. Nuget is already in the path. Would it be possible to override the functionality that tries to download Nuget to allow for using one already in the system path?
The text was updated successfully, but these errors were encountered: