Visual Studio Db project with custom static code analyzer - visual-studio

I've troubles with adding some sample code analyzer into a db project.
I followed this guide: https://msdn.microsoft.com/en-us/library/dn632175(v=vs.103).aspx
, but custom analyzer hadn't added.
What I was missing?
P.S. I'm using VS 2015 Enterprise with SSDT 2016

If you are certain all is good from your side, it's probably due to the dll being in the wrong folder. When I hit this issue I find it easiest to run with logging and place the dll where ssdt is looking to rather than trial and error placing in random folders ☺
Kevin Cunnane has described the procedure in the comments on this page
https://blogs.msdn.microsoft.com/ssdt/2016/06/30/sql-server-data-tools-july-update-2/

Related

SSIS error in Visual Studio 0xC0010009

I've run into an issue with an SSIS package in Visual Studio 2010 and 2012. When I try to open the package I get the following error:
"Microsoft Visual Studio is unable to load this document
Exception from HRESULT: 0xC0010009"
No other information is provided. I have multiple SSIS packages in the solution and the others open. This package opened until I checked it into TFS and then it broke. Any ideas where I could get more information on the error? Or how to solve it?
Don't know if this is related, but thought I'd throw it out there.
Using SSIS Version 12.0.21005.1 REL, I received the same error and was able to solve it by editing the .dtsx with a good xml editor (hat tip to notepad++).
Basically, ensure it is well formed and all references agree. For example, in a simple ETL package with OLE DB Source, Transformation, and Output steps in a DataFlow, I found 24 references to each column involved. For one column, one reference somehow disagreed with the other 23 (it ended up being misspelled; not sure how that happened). Fixing that solved the error.
Hope that helps.

Porting Visual Studio VSPackage to SSMS 2012 or 2014

I recently discovered an extension for visual studio that allows you to specify a watermark for the code window. This extension can be found on github here.
https://github.com/nategreenwood/VSEditorBackgroundChangerExtension
As part of a small project I am attempting to get it to work on SQL Server Management Studio. While Microsoft doesn't officially support extending SSMS - they also do not discourage it. Those are their words, not mine.
Looking into the extension\application sub folder under SSMS for SQL Server 2014 it is obvious that Microsoft uses VSPackage to include their own extensions to the Isolated Shell version of Visual Studio that SSMS is built on top of. The manifests appear to be version 1 manifests however.
These show up in the following location on my own box:
C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\Extensions\Application
Looking for assistance in verifying if this extension can be modified to work with SSMS. I have modified the package manifest in a variety of ways - including rewriting the package as a version one style package and manifest. I can see the package registered under the pkgdef guid that VSIX generates. It says it has been installed. No error messages are thrown, but no image appears either.
Does the Isolated Shell and more specifically, the code window utilized by SSMS to develop and execute TSQL support adornments such as the ones used by this package? Does SSMS support version 2 manifests and VSPackages?
Any advice on how to modify this package to get it to work is appreciated.
My own attempts are further documented here: http://sqljudo.wordpress.com/31-days-of-ssms/ssms-day-30-vspackage-and-ssms/
Looks like there was an official Connect answer on this: https://connect.microsoft.com/SQLServer/Feedback/Details/2602390
In 2012 and 2014 the old "Addin" mechanism needs to be used, and as of 2016 (general release) the new "VSPackage" mechanism needs to be used (ref: http://blogs.sqlsentry.com/aaronbertrand/plan-explorer-add-in-ssms-2016/ )

Replace Devart DotConnect with MySQL Connector / Net - Visual Studio 2010

I am working on a Visual Studio 2010 Solution. This solution is a web-site comprised of multiple web apps (using JavaScript, ASP, etc.).
Every time I compile, I get an error message stating that my DotConnect trial has expired.
Instead of forking out the cash, I would like to use the MySQL Connector / Net and replace all instances of DotConnect with instances of MySQL Connector / Net.
Can anyone help me with this task please?
Ended up having to install everything on entirely new computer. Then I imported the source code files and did a find/replace to replace all references from the old connector to the new one. Turns out visual studio is picky. Depending on your 'References' you may have issues if your version of MS Office doesn't match the source code.
Good luck if you're having the same issue.. smh :/

Convert SharePoint 2010 Solution to 2013 and Visual Studio 2012

I am trying to convert a SharePoint 2010 solution (custom web parts, content types, lists, event receivers, etc.) developed in Visual Studio 2010 to SharePoint 2013 and Visual Studio 2012. When I open the project in VS 2012, it converts a couple of the project files but won't compile because of reference issues.
I copied the DLLs (mostly Microsoft.SharePoint..., although I needed to copy the Microsoft.Office.SecureStoreService.dll too) that were causing issues from my 2010 server to the 2013 server and fixed the references. However, the Microsoft.Office.SecureStoreService.dll still gives me compiler errors claiming "Error 203 The type or namespace name 'Office' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)" when visual studio has no problem with the namespace and finds the SecureStoreProvider class inside it just fine.
I've also tried to change the target framework from 3.5 to 4 and only see "Install other frameworks..." in the target framework dropdown.
I'm sure that others have dealt with this, but have been unsuccessful in framing the right google search query. I'm relatively new to SharePoint in general and any help would be appreciated.
thanks,
Mike
I was able to get my solution upgraded from a 2010 project to 2013 using the following. Note that this will update your solution to use the new 2013 API. It is possible to update just the project file but still run in 2010 mode.
First edit your .csproj file (for c#).
Modify the target framework to this:
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
Add this a node for the office version, I put mine directly below the TargetFrameworkVersion tag
<TargetOfficeVersion>15.0</TargetOfficeVersion>
Update references
Reload the project and update your referenced assemblies. If you haven't specified a specific version they should already be referencing the v15 (SharePoint 2013) assemblies.
Do a find replace for 14.0.0.0 to 15.0.0.0. This updates any references on your pages, layouts, and master pages to the v15 assemblies.
Change calls
Change any calls to SPUtility.GetGenericSetupPath() to SPUtility.GetVersionedGenericSetupPath()
Check each file to do a check for any hive references. You'll need to add a /15/ to these. EG: _layouts/ to _layouts/15/
Open the package "folder" in visual studio then update the properties for that package to use version 15.
Clean up
Finally do a compile clean up any missed items. Deploy your solution and make sure to test thoroughly.

Planning to upgrade VS 2005 to VS 2010

I have installed VS 2010 and want to migrate all code written in VS 2005 to VS 2010.
Please note that we do not have VS 2008, all code are in C# 2.0 and Asp.net 2.0 only.
Can anyone please tell me now what all points need to be considered while migrating.
Update:
I have set target framework to 2.0 for all of my Libraries and web projects. It complies without any error!
However, when site opens in IE (Set to default.aspx), it gives me error as below:
InternalXmlHelper.vb(9) : error BC30560: 'ExtensionAttribute' is
ambiguous in the namespace 'System.Runtime.CompilerServices'.
<Global.System.Runtime.CompilerServices.ExtensionAttribute()> _
Keep all the target framework settings to .NET 2.0. This way, there should be no compilation problem at all.
The changes that you should see are the solution and project files only.
Start with known good solutions in source control (and label—you shouldn't need to go back, but easy to add an extra safety net).
Open each solution in VS2010, allow the conversion wizard to do the conversion.
Resolve any issues.
Honestly, if you're just upgrading VS 2010 you don't really need to consider much. Just keep backups (any real SCM product will do) and you're good. You don't have to upgrade your applications' runtime targets at all if you don't want to.
If you're building with CAS policy, you might run into issues with using MSBuild 4.0 to build you 2.0 applications. If you don't know what I'm talking about, never mind.
My advice is to make sure everyone's "checked in" to your source code provider, and run the conversion wizard and see how it goes.

Resources