Showing posts with label VS2012. Show all posts
Showing posts with label VS2012. Show all posts

Sunday, September 29, 2013

Principal User is missing prvReadSolution privilege in CRM 2011 using VS 2012

Hi,

I was working with the latest CRM 2011 SDK using VS 2012 and when i was creating a workflow for MS Dynamics CRM, i got an error while trying to connect to the CRM. Here is the error message:



Principal User is missing prvReadSolution privilege


To fix the problem, follow below steps:
1) Login to your CRM.
2) Select Settings tab.
3) Click on Administration and then click on the Security Roles icon, or if you assigned the permissions to the user directly then open the permissions tab for the user you are using to login to the CRM from VS 2012.
4) Click on the customization tab.
5) Look for the solution list item and set the read permissions only.



6) Click on Save and Close.
7) Try to connect from VS 2012, you will be able to connect with no issues.

Hope this helps.

Sunday, September 15, 2013

One or more errors occurred while processing template 'Entity.tt'. Using Reverse Engineer Code First in VS 2012 Update 1

Hi,

Using VS 2012 Update 1, I was doing some changes in my database schema and when i try to reverse engineer code first my updates i was getting the following error:

One or more errors occurred while processing template 'Entity.tt'.

In the output window, VS listed that System.Xml and System.Xml.Linq exist on 2 different paths, one where the .NET framework is installed and the other one is pointing to the Siliverlight 5 DLLs in the GAC.

While it is reported as a bug in Microsoft Connect website, I was trying to remove the link to the Silverlight 5 Dlls that i'm not in need when i reverse engineer code first my EF files to apply my DB changes.

To fix this problem: 
1) Open the following directory:

C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\Templates\Includes

2) Take a backup from EF.Utility.CS.ttinclude or the VB version based on the your project language you are using.

3) Open the notepad in an administrator mode.

4) Open the CS.ttinclude file.

5) change the following 2 lines:

<#@ assembly name="System.Xml" #>
Change it to:
<#@ assembly name="System.Xml, Version 4.0.0.0, Culture=neutral" #>

<#@ assembly name="System.Xml.Linq"#>
Change it to:
<#@ assembly name="System.Xml.Linq, Version 4.0.0.0, Culture=neutral"#>

6) Save the file.

7) Right click on the project that has the EF files and click on Reverse engineer Code First.

8) bingo! you will get your database updates with no errors.


Let me know if you have any issues with this.

Thursday, June 13, 2013

How to set parameters' values to SSIS packages

Hi,

This post to walkthrough step-by-step how to pass parameters to a SSIS package.
Usually you have set of parameters and you want to set the values at run time before the package runs.

The methodology that i will implement in this post, is to export the parameters that i want to set from an XML file by defining the SSIS configuration file using Visual Studio BIDS 2008/2010 or SQL Data tools.

Let's say, you have a SSIS package with a parameter called @myParameter, Here is how to setup the configuration file for the SSIS so we can pass it when the package runs.

Steps:
1) Open yout SSIS package.
2) Right click after you open the package and select on "Package Configurations".




 


3) Set the configuration file name and click on Next button.



4) Under Variables node, select the parameter name "@myParameter" you want to export to the configuration file, then click on Next button.
5) Write a name for the configuration and click on next.
6) The VS BIDS will create a XML file with the exported parameter properties.
7) open "TestPackage.dtsConfig" using the notepad and set the value property for the exported parameter.
8) Change the value of the parameter value in the dtsConfig and then save the file.
9) Run your package and the SSIS package will get the updated value from the xml file.

Hope this helps.


 

Thursday, May 09, 2013

Microsoft.ReportViewer.Common.dll is missing!

Hi Folks,

If you are having ASP.NET web application that is using Report Viewer control, you should be having the following dlls on your machine:

Microsoft.ReportViewer.WebForms.dll
Microsoft.ReportViewer.Common.dll

The first dll, has to be added as a reference in your bin directory while the second one can reside in GAC.

You probably will be getting an error if you don't have the common dll on your machine, first, first check the GAC:  C:\Windows\assembly

If you don't have it, then you need to install Report Viewer Redistributable package.

Here you have to note that the version of the dll will vary based on the installer version.

If you want version 10, you have to install VS 2010 release, here is the link:
http://www.microsoft.com/en-ie/download/details.aspx?id=6610

If you want version 09.00.21022.08 of the dll, you need to install VS 2008 release:
http://www.microsoft.com/en-us/download/details.aspx?id=6576

If you want version 8 of the dll, you need to install VS 2005 release:
http://www.microsoft.com/en-us/download/details.aspx?id=6219


Hope this helps.

Tuesday, May 07, 2013

Import SSIS package error 0xC0010014 when importing SSIS package

Hi Folks,

I'm writing this blog post to share an interesting find while i was developing a SSIS package using VS 2012 with BI tools. Microsoft has release on March this year 2013 BI tools to VS 2012 so you don't need to use VS2010 shell while developing SSIS packages.

The download link for BI tools in VS 2012 is here:
http://msdn.microsoft.com/en-us/library/jj856966.aspx

After i developed my SSIS package and try to deploy it on the SQL Server 2008 R2. I was getting the following error message when importing the package, here is the screen shots:

 
If you are using the Management studio you will get this above error without details!, but to get the detailed error message use SSIS Execute Package Utility, you can launch it from SQL SERVER 2008 R2 --> Integration Services --> SSIS execute Package utility
.


If you read the actual error message it says:
Package Migration from Version 6 to Version 3 failed with error 0xC001700A

Basically the Version that i used to develop the SSIS is higher than the recognized version by the SQL Server 2008 R2. To fix this problem you need to change the package version from 6 to 3 and it works like a charm!

Follow the following steps:
1) Right clich on our dtsx file and select edit, Open the file in notepad.
2) Look for:

      DTS:Name="PackageFormatVersion">6

3) Change the number 6 for the version to 3 and save the file.
4) Select the File System File from the SSIS execute utility and you will not get any errors!
6) From the management studio you can import the SSIS with no errors.

Hope this helps.

[Update 05/09/2013] You will run through other issues if you used VS 2012 SQL Data tools against SQL Server 2008 R2, one of them is the sql job agent will fail to run the imported job due to the xml format mismatch while executing the package. So, it is recommended to develop any SSIS SQL2008 R2 components using the old BIDS VS 2008.


-ME