If you work in an international team there may occur problems with the Locale property of datasets.
The error may also occur when running the application: "Cannot add a DataRelation or constraint that has different Locale..."
Often you can not fix this within visual studio but there is a simple way to fix it with notepad:
Search and replace the string "msdata:Locale="de-CH" (example for German-Switzerland) with an empty string using notepad. Simply open the xsd file with notepad.
Make sure to create a backup before. If you have a versioning tool this should be no problem anyway.
Friday, December 10, 2010
Tuesday, March 23, 2010
Strong Name an existing assembly (dll)
Today I needed to strong name an existing third party assembly in order to use it for SharePoint (GAC). I found a great solution from "DoubleJ" at http://sadeveloper.net/forums/p/1195/5115.aspx
I copied it here in order to make sure I does not get lost:
"From a VS.NET command prompt, enter the following:
1. Generate a KeyFile
sn -k keyPair.snk
2. Obtain the MSIL for the provided assembly
ildasm providedAssembly.dll /out:providedAssembly.il
3. Rename/move the original assembly
ren providedAssembly.dll providedAssembly.dll.orig
4. Create a new assembly from the MSIL output and your assembly KeyFile
ilasm providedAssembly.il /dll /key= keyPair.snk
Viola! You now have a strong named assembly."
I copied it here in order to make sure I does not get lost:
"From a VS.NET command prompt, enter the following:
1. Generate a KeyFile
sn -k keyPair.snk
2. Obtain the MSIL for the provided assembly
ildasm providedAssembly.dll /out:providedAssembly.il
3. Rename/move the original assembly
ren providedAssembly.dll providedAssembly.dll.orig
4. Create a new assembly from the MSIL output and your assembly KeyFile
ilasm providedAssembly.il /dll /key= keyPair.snk
Viola! You now have a strong named assembly."
Sunday, March 7, 2010
WebPart button event fires only once
In order to make sure a button in a WebPart (for example to export data to excel) can be clicked more than once add the following to the OnClientClick event:
buttonExportToExcel.OnClientClick = "_spFormOnSubmitCalled = false;_spSuppressFormOnSubmitWrapper=true;";
buttonExportToExcel.OnClientClick = "_spFormOnSubmitCalled = false;_spSuppressFormOnSubmitWrapper=true;";
Subscribe to:
Posts (Atom)