I've got a database project as part of my solution in Visual Studio 2013. Been working perfectly for the last 3 weeks and now suddenly today it won't build and so I cannot publish any changes. I'm getting an MSBuild error:
"C:\Program Files
(x86)\MSBuild\Microsoft\VisualStudio\v12.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets(513,5):
Error: MSB4018: The "SqlBuildTask" task failed unexpectedly.
System.MethodAccessException: Attempt by method 'Microsoft.Data.Tools.Schema.Sql.Build.SqlTaskHost.OnCreateCustomSchemaData(System.String,
System.Collections.Generic.Dictionary`2)'
to access method
'Microsoft.Data.Tools.Components.Diagnostics.SqlTracer.ShouldTrace(System.Diagnostics.TraceEventType)'
failed."
Anyone got any ideas? All I did this morning was pull down the latest changes from source control. I can't see how that would mess up the actual MSBuild process, and the guy who checked in last doesn't have any issues at all.
You need to install the last version of SQL Server Data Tools:
http://msdn.microsoft.com/en-US/data/hh297027
Make sure to restart VS and then build the solution again. This solves the problem!
In Visual Studio 2013 -> Tools -> Extensions and Updates... -> Updates -> Product Updates -> Microsoft SQL Server Update for database to 12.0.50318.0
I was upgrading from 12.0.41012.0 and this resolved my issue. This relates to the answer to install the latest SQL Server Data Tools.
I am using Visual Studio Community 2013.
I had same error:
You can fix it by updating the SQL Server Tools:
Tools --> Extensions and Updates
Then under Product Updates you will see an option to update SQL Server Update.
Click on Update, after it has installed restart Visual Studio.
Try:
Install the latest DacFx from http://www.microsoft.com/en-us/download/details.aspx?id=43370
Reinstall the latest SSDT from http://go.microsoft.com/fwlink/?LinkID=393521
Source: VS2013 SqlBuildTask 04018 Error
I searched "Visual Studio 2013 Update 2" in MSDN subscriber downloads and it was there
Also I filed a bug with MS
VS2013 SqlBuildTask 04018 Error Please up vote it if you are getting the same problem
I had the same issue. I tried to repair Visual Studio 2013, update 4, SSDT, the DAC tools, etc., but it didn't work any better.
However I noticed the Microsoft.Data.Tools.Schema.SqlTasks.targets file present in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\SSDT was dated from 2013 (In fact it corresponded to the old SSDT). So what I did is just copy the new one (which I suprisingly found in C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT ...) over to this v12.0\SSDT folder, restarted Visual Studio 2013 and now it works. For information, that new SSDT targets file is dated from 2014/10/26 and its size is 75437 bytes.
It turns out the issue was with Visual Studio Update 3. I uninstalled and reinstalled VS 2013 to Update 2 only and reinstalled Data Tools and it works perfectly now.
I already had the newest Version of SQL Data Tools installed, but after installing VS2015 RC it stopped to work. After run a repair on SSDT it compiles again with success.
I had Visual Studio 2013 Update 5 installed and was having this issue. I followed these steps from above and that fixed the issue for me -->
In Visual Studio 2013 -> Tools -> Extensions and Updates... -> Updates -> Product Updates -> Microsoft SQL Server Update for database to 12.0.50730.0
I had the same issue and just restart the Visual Studio and it works for me.
I experienced the same issue with a slightly different stack trace:
Error MSB4018: The "SqlBuildTask" task failed unexpectedly.
System.IO.IOException: The file exists.
Turns out this is a issue with the Temp directory for the service account I was using, I think if you exceed X number of folders/files in that directory the publish will no longer work. Fixed this issue by following the instructions mentioned here (for my service account):
Go start-> run
Type %temp% and click ok
Make sure you are in the folder /Local/Temp
Delete everything in this folder
If it helps anybody, I installed VS2014 CTP 3, and I can build from it. Interestingly after a successfull build in vs2014, the next time you build in VS2013 it works. But subsequent builds in VS2013 dont work, until you rebuild in VS2014.
I was able to fix the issue by repairing Microsoft SQL Server Data Tools and re-starting Visual Studio 2013.
Control Panel > Right Click: "Microsoft SQL Server Data Tools" > Click: "Repair" > Re-Start Visual Studio
I had the same issue. Running disk check and then rebooting fixed it.
I got the same error and fix it by re-install Visual Studio 2015
I had this problem and fixed it like this:
install the latest DacFx from http://www.microsoft.com/en-us/download/details.aspx?id=43370
Delete the Microsoft.Data.Tools.Schema.SqlTasks.targets file from C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\SSDT
repair SQL Server Data Tools 2013 , reset visual studio()
Related
I have installed the SSAS extension in Visual Studio 2022, it works well but it allows me to create Multidimensional projects only. "Analysis Services Tabular Project" is missing from the list. Any idea what's going on?
Thank you
You need to install it from the Visual Studio Gallery. It looks like there is a temporary workaround in the Q&A tab to resolve the issue you are seeing.
Uninstall AS extension.
install the AS extension and close the VS2022.
copy/replace the manifest file(link to download the file is below) in the SSAS folder, a location where your VS22 is installed. For
example "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\SSAS".
run the following command in cmd at a location where VS2022 is installed. For example "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE" command: "devenv.exe /updateconfiguration"
open visual studio and it should work fine.
if it still doesn't, make sure the AS extension is enabled and then execute the 3rd step again after closing VS.
link:
https://microsoftapc-my.sharepoint.com/:u:/g/personal/namangupta_microsoft_com/EdG1BxmX0W5OlLt4CHIZJqYB-8fXSocUi-zK5lqqBLURpg?e=rHCh9F
By Microsoft 3 hours ago
If you are looking for other extensions in 2022 this page has instructions and links.
Had the same problem with a old VS 2022 Version. Updating my VS 2022 to 17.3.4 an re-installing SSAS Extension was resolving the issue.
We now have a permanent fix for the issues. Please go ahead and update
your VS 2022 version to 17.2.5. You should now be able use Tabular and
Multidimensional Models.
I just migrated from SSDT 2015 to SSDT 2019 and tried to open a project created in SSDT 2015. One of the packages has a data flow task with a script component in it. The script component fails to build with the error:
Could not find part of the path
'C:\Users\xxxxxx\AppData\Local\Temp\2\Vsta\c2e811fdc5974e2ca3f7cb5426c82033_out'
I tried to delete the .vs folder in my project but that didn't work. The script still fails to rebuild. The script has a lot of classes in it so I'd rather not start from scratch and copy everything into it. Any idea what could be wrong?
Appears this issue may be caused by an incompatibility between Visual Studio 16.9 and SQL Server Integration Services Projects. The issue is described here: https://marketplace.visualstudio.com/items?itemName=SSIS.SqlServerIntegrationServicesProjects
Recommendation is to regress back to Visual Studio 16.8 or earlier.
The new version of data tools fixed it for me without rolling back to 16.8. This was a difficult issue to resolve. Nowhere in the MS documentation do they mention the tools update fixes that specific error. Thanks for the link!
The ADO.NET Model Templates are missing in my version of VS2015. I have tried installing the SQL Server data tools and re-installing the EF Tools as per suggestions found elsewhere but neither have helped. Does anyone have a solution for this issue?
Many thanks
I fixed the same problem in the following way
got to the Control Panel -> Programs and Features -> Right click on Visual Studio 2015 -> Modify -> (tick the feature "Microsoft SQL Server Data Tools" ) and Update
give it a try
I was getting the No items found message when attempting to simply add a new class to my project, and managed to fix it using the steps provided by this blog post by Kevin Wilson
Close Visual Studio
Remove (and backup) the following directories from your Visual
Studio installation.
VisualStudioInstallDir\Common7\IDE\ItemTemplatesCache
VisualStudioInstallDir\Common7\IDE\ProjectTemplatesCache
Run command prompt as administrator, and navigate to the Visual Studio directory, e.g.
cd C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7IDE
Run the following command to regenerate the item and project template caches
devenv.exe /InstallVSTemplates
Restart Visual Studio, and if everything's worked, your class & project templates should all be working normally again.
Continuous Build Database Project fails when building on TFS server. We have Visual Studio 2013 Shell (Integrated) installed. There does not appear to be a way to install SQL Server Data Tools 2013 thru' Tools > Extensions and Updates... menu.
The redacted error is below...
C:\TFSBuild\XXX\XXX\Database_CI\Sources\Database\XXX\XXX.sqlproj (126): The imported project "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk.
Has anyone experienced this? Is there a solution or work-around? Is SSDT available for VS 2013 Shell for SQL Server 2014?
I have recently installed the Visual Studio Shell (Isolated) and (Integrated) on our build server and it does not include the SQL Server tooling components. I found out that SQL Server tooling is built in to the following versions of Visual Studio (see here):
Express for Web,
Express for Windows Desktop,
Professional,
Premium, and
Ultimate
I would recommend installing at least the Professional version and then you should get the SQL Server Data Tools components that are required for building.
SQL Server Tooling is now built into the above listed versions of Visual Studio 2013 (SSDT and Visual Studio versions) and the latest March update of Visual Studio 2013 now includes SQL Server 2014 support (SQL Server Data Tools for SQL Server 2014 is available.)
To force your build to use the correct version of MSBuild set the Process - Advanced - MSBuild arguments = "/p:VisualStudioVersion=12.0" (without the quotes) as shown.
You can download SSDT for VS2012 here and that should get the database pre-reqs on your build server.
I do see mention of "Sql Server Tooling in Visual Studio 2013" on this landing page, and I think it implies these tools should be available with the shell, so if you could, check to see if you have that targets file somewhere on your build server.
Go into C:\Program Files(x86)\ and do a "dir Microsoft.Data.Tools.Schema.SqlTasks.targets /s /b" and see if something comes up.
Right now it's hard-coded to this location:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets
You might want to see if the file already exists, but in another location, like in an "v12.0" folder instead of the "v11.0" subfolder.
EDIT
Actually, what's the value on line 126 of your .sqlproj?
If it says this:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v11.0\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
Change it to read:
<Import Project="$(MSBuildExtensionsPath)\Microsoft\VisualStudio\v$(VisualStudioVersion)\SSDT\Microsoft.Data.Tools.Schema.SqlTasks.targets" />
Then have everyone test it using diagnostic logging, then gather the logs and compare them to make sure that version is consistent so you can start phasing out the legacy bits.
I had the same issue and fixed it by downloading and installing the following
dacframework.msi
SQLDOM.MSI
SQLLS.MSI
SQLSysClrTypes.msi
from here:
https://www.microsoft.com/en-au/download/details.aspx?id=42295
Everything about my VS 2013 install appears to be working correctly except when I right click on a table in Server Explorer. I am trying to use the data tools to view the table, which is in a MS SQL database. Here is the message VS 2013 pops when I right click:
The 'Microsoft SQL Server Data Tools' package did not load correctly.
The problem may have been caused by a configuration change or by the installation of another extension. You can get more information by examining the file 'C:\Users\...\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml'.
Here are the last few lines of the ActivityLog.xml, btw one of the most cryptic log files I have ever read:
1222 Begin package load [Microsoft SQL Server Data Tools] {00FEE386-5F9F-4577-99F4-F327FAFC0FB9} VisualStudio 2014/02/14 13:50:50.112
1223 ERROR SetSite failed for package [Microsoft SQL Server Data Tools] {00FEE386-5F9F-4577-99F4-F327FAFC0FB9} 80131534 VisualStudio 2014/02/14 13:50:50.641
1224 Entering function CVsPackageInfo::HrInstantiatePackage {FEF13793-C947-4FB1-B864-C9F0BE9D9CF6} VisualStudio 2014/02/14 13:50:50.650
1225 Warning Unexpected system error mode before loading package [SqlStudio Editor Package] {FEF13793-C947-4FB1-B864-C9F0BE9D9CF6} VisualStudio 2014/02/14 13:50:50.650
1226 Begin package load [SqlStudio Editor Package] {FEF13793-C947-4FB1-B864-C9F0BE9D9CF6} VisualStudio 2014/02/14 13:50:50.650
1227 End package load [SqlStudio Editor Package] {FEF13793-C947-4FB1-B864-C9F0BE9D9CF6} VisualStudio 2014/02/14 13:50:50.691
1228 ERROR End package load [Microsoft SQL Server Data Tools] {00FEE386-5F9F-4577-99F4-F327FAFC0FB9} 80131534 VisualStudio 2014/02/14 13:50:51.044
Here is what I have done to try to solve this problem:
Disabled all plugins/extensions
Checked for and applied all updates for all extensions and VS 2013 including Update 1
Did a full VS 2013 install repair operation
VS 2013 now includes the SSDT tools in VS 2013, so I cannot download and install anything, it is suppose to already be working. Not unless someone knows of a different trick.
I am out of ideas and I have searched quite extensively about this, most of it applied to VS 2012. If anyone has any good suggestions, that would be awesome.
Go to 'Add/Remove Programs' in Control Panel, search for "Microsoft SQL Server Data Tools" and repair.
Worked for me.
And just in case none of those work, you can go to the Download Latest SQL Server Data Tools Microsoft page itself. It lists out the versions of the tool set for each version of Visual Studio
I had the same issue. After trying the other answers and not resolving the issue, I was able to resolve it by
Uninstalling Sql Server Data Tools from the control panel
Navigating to Extensions and Updates
Go to Updates tab -> Update Visual Studio
You should get a prompt to enable optional features, choose SSDT
Wait for the long installation process, restart if necassary.
Fixed it for me
It is not in VS after 2012. Try this link, install separately
http://www.microsoft.com/en-us/download/details.aspx?id=42313
There is no stand-alone install for VS 2022 :(