I tried to deploy a K2 blackpearl process (developed and tested on server DEV in domain A) to a test environment (server TEST, domain B) via the command line, but it freezes at some stage.
Normally you could deploy a process from within Visual Studio with a click on “Deploy”. Then you will get a wizard to choose your environment. If your environments are not on the same domain, K2 blackpearl supports the deployment through the command line.
In Visual Studio right click on the process and select “Create Deploy Package”. After it finishes, you will find some files in the obj\Debug folder. One file is a .msbuild file.
I copied all files, as mentioned in the K2 docu, to the target machine and fired up:
msbuild MyProcess.msbuild /p:Environment=Test
First, it looks good, because my InfoPath form was deployed to the SharePoint site, then the console showed the following lines:
Deploy Processes: Task Started (26.02.2009 17:00:00)
Adding Process : MyProcess\Demo1
Nothing more! I waited about 30 minutes, but nothing happened, no error messages, nothing.
Long story short: The solution is, that the value of the “SharePoint Target Site” environment field MUST end with a “/” (e.g. “http://mossServer/targetSite/”)! You can change this within Visual Studio in the Environment Browser or directly in the .msbuild file.
No more comments…
If you ever tried to publish one or more pages with your site definition (by onet.xml), you see in Visual Studio (with the SharePoint XSD schemas selected) only one valid value for the “Level” attribute which is “Draft”:
But for this attribute you can choose between every value of the SPFileLevel enum. So for publishing the page automatically, set the Level to “Published”. Thats it.
If you already know how to enable XSD schema validation and IntelliSense support stop reading here.
Enable Schema Validation:
- Open your xml file, e.g. onet.xml (works with all SharePoint related xml files)
- In the property pane, click the ellipsis next to the “Schemas” property
- Add the wss.xsd. This file is located in the 12\Template\XML directory
- Now add the following xml Namespace attribute to the root element (here Project in onet.xml):
<Project xmlns="http://schemas.microsoft.com/sharepoint/" Title="" [...]
Now you should have IntelliSense and schema validation enabled.
Folgendes Szenario: Ein (relativ umfangreiches) InfoPath 2003 Formular, mit Managed Code in .NET 2.0 und ein paar Data Connections die Daten von WebServices abrufen.
Das Formular selbst ist inzwischen ziemlich groß geworden und von einer Sekunde auf die andere lädt das Forumlar einfach nicht mehr. Dazu folgende Fehlermeldung:
The query cannot be run for the following DataObject: XXX
InfoPath cannot run the specified query.
Attachment: Maximum retry on the connection exceeded. - HRESULT=0x80004005: Unspecified error
Nach ein paar google recherchen ist dieser Fehler scheinbar nur in anderen Zusammenhängen bekannt... Also alles mögliche probiert, aber keine Besserung. Dann mal ein neues Formular erstellt, data connection hinzugefügt, geladen --> lädt ohne Probleme.
Nach etwa einem Tag verzweifelten rumprobieren, das Formular mal auf einem anderen Rechner geladen --> lädt ohne Probleme!
Der Unterschied der beiden Systeme: Auf dem, auf dem es nicht läuft, ist nur das Office 2003 SP1 installiert, auf dem anderen SP2!
Lösung also: SP2 installieren.
Trotzdem bleibt es natürlich sehr fragwürdig, wieso es a) lange ging und erst auf einmal nicht mehr und b) ein neues Formular mit den komplett selben Einstellungen läuft.
Mag vielleicht an der größe des Formulars liegen oder an dem Wetter... ;-)
Die Beta 2 vom Visual Studio 2008 (ehemals Orcas) ist ab sofort verfügbar.
Die beste Einstiegsseite ist die MSDN Subscription Seite falls verfügbar oder hier:
http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx
Dort gibt es auch bereits fertige VPCs mit VS 2008 Team Suite und Team Foundation Server (TFS) vorinstalliert.
Der Team Foundation Server ist im großen und ganzen ein sehr nettes Tool. Insbesondere im Gegensatz zu SourceSafe nicht nur deutlich umfangreicher, sondern er "soll" auch besser sein.
Problem / Bug(?):
- Neue Datei zu einem Projekt hinzufügen oder besser noch durch copy/paste eine vorhandene, eingecheckte Datei in das gleiche Projekt kopieren
- Die soeben neu erstellte Datei umbenennen
- Alles einchecken
Die Datei lässt sich nicht einchecken, obwohl es zunächst so aussieht. Nach beenden und neu starten des Studios hat die Datei überhaupt kein Zeichen mehr vor dem Dateisymbol und ist somit nicht mehr unter Quellcodekontrolle.
Lösung des Problems:
Die Team Foundation Server Power Tools runterladen, installieren und mit der Kommandozeile in den Ordner mit der Solution wechseln, bsp.:
cd "C:\Documents and Settings\user1\Visual Studio 2005\Projects\testproject"
Dann tfpt.exe aufrufen mit: "tfpt.exe online"
Im erscheinenden Fenster die entsprechende Datei anhaken und auf "Pend changes" klicksen. Studio neu starten und die Datei lässt sich wieder einchecken wie gewohnt.
Für alle die mit SQL Server Datenbanken kämpfen, insbesondere auch im Team, denen möchte ich heute Visual Studio Team Edition for Database Professionals empfehlen.
Vor einiger Zeit habe ich es installiert und dann erstmal vergessen. Aber jetzt wo ich ein Datenbankschema erstellen wollte, mich direkt dran erinnert und ich muss sagen: Wow, sehr gelungen.
Man hat Datenbankänderungen bestens im Griff, kann alle Änderungen sehr leicht in (verschiedene) Datenbanken deployen und auch dem Kunden später einfach ein einziges File geben, was die gesamte DB erzeugt, auf Wunsch auch mit Daten. Außerdem lassen sich Unit Tests z.B. für Stored Procedures erstellen, usw. Es lohnt sich also das ganze mal auszuprobieren!
Is it possible that no one ever tried this "easy" thing before? I can't belive that, but I did't find anything on the whole internet.
Ok, here it is:
I have a class library makes use of the Visual Studio feature to automatically create satellite assemblies for other languages. Nothing special. If you don't know, here it is how it works:
Create the class lib project, add a resource file (Strings.resx) with one entry (Hello=Hello) and Visual Studio automatically created a strongly-typed resource from that.
Now you can use MessageBox.Show(Strings.Hello); to access this string.
If you now add another resource file called Strings.de.resx (Hello=Hallo) you can do this to access it:
Strings.Culture = new CultureInfo("de");
MessageBox.Show(Strings.Hello);
And this is the output after building:
- \MyAssembly.dll
- \de\MyAssembly.resource.dll
So, now I want to use this simple library in my InfoPath project. Open it in Visual Studio, add the reference to the assembly and build: Ok. Then publish this InfoPath Form. VS now should compile all associated resources, dlls and so on into the InfoPath *.xsn file, but it does not!
And that's the problem here: It looks like that VS can't embed the satellite assemblies residing in subfolders into the .xsn file...
If anyone has tried this before (and got a solution ;-)) let me know.
Nachdem ich hier ja schon vom SP1 geschrieben habe, ist nun auch das VS2005 SP1 Update for Vista (Beta) zum Download verfügbar.
Nach der Installation startet das Studio jetzt mit einer anderen Warnmeldung: Man soll das Studio doch bitte mit Adminrechten starten... naja, mal sehen ob es auch ohne Adminrechte (wie bisher ohne SP1 bestens) läuft...
Hmm... Gerade auf Vista installiert (und Windows Vista wird als gültiges Betriebssystem in den Systemrequirements aufgeführt) und jetzt erscheint diese tolle Meldung:

Aha... also nochmal auf die Microsoft Seite, und was lese ich da jetzt?
Das "SP1 Vista Update" ist derzeit a) nur als Beta erhältlich und b) ist der Downloadlink tot!
Ach ja, die Installation dauerte nur 25 Minuten.
Gerade hier gelesen, dass das Service Pack 1 von Visual Studio 2005 ab sofort erhältlich ist. (Für die Express Edition hier)
Und dann nachgesehen und erstmal über solche Aussage gestolpert:
"When installing on Windows Vista™ with User Account Control (UAC) active, there can be a substantial delay before the initial setup dialog is displayed. During this time, a UAC function is verifying digital signatures within the installation package. This service pack carries a large number of files causing the process to take up to one hour in some cases."
Ein "erhebliches" Delay... eine Stunde! Wow... Mal gucken wie lange es auf meinem Vista mit einem "Experience Index" von 4,4 dauert... (naja, an meinen Platten wirds nicht liegen... mit 5,4 von 5,9 möglichen Punkten)
Bin gespannt ob sich dann auch wirklich soviel getan hat, insbesondere beim Betrieb unter Vista. Bei einem knapp 500MB großen Service Packt dürfte man da einiges erwarten...
Gestern habe ich zwei sehr interessante Artikel von Ralf Westphal entdeckt, in denen er auf Komponenten-orientierung, Contract-First-Design und Microkernel eingeht.
Da wäre zum einen "Dynamic component binding made easier" in dem auch ein Beispiel Projekt gezeigt wird und zum anderen "Training students to use Software Cells, Contract-First-Design and a Microkernel" wo es um einen Workshop an einer Uni zu diesem Thema geht.
Bisher war mir nicht bewusst was ein Microkernel beim Komponenten basierten erstellen von Software leisten kann: Nämlich saubere Trennung der einzelnen Komponenten über vorher definierte Interfaces (Contract-First). So lassen sich die einzelnen Komponenten unabhängig voneinander entwickeln und eben auch vollkommen unabhängig voneinander testen.
Also mein Tip: Unbedingt die beiden Artikel von Ralf lesen! Es lohnt sich wirklich! Hätte ich das alles etwas eher entdeckt, würde unser Diplomarbeitsprojekt jetzt sicher auch etwas anders aussehen... ;-)
Nützliche Tools für das ganze:
- Eine Microkernel Implementierung, z.b. die von Ralf (siehe Downloadlink am Ende des Artikels) oder das Castle Project, etc.
- NUnit - Das bekannte Unit Testframework für .NET zum Testen der einzelnen Komponenten.
- NMock - Ein Mock Object Framework. Damit lassen sich Dummy-Objekte für die Unit Tests bauen.
Ab sofort gibt es
MSDN Solve auch auf Deutsch!
Dort gibt es kurze Codeclips, ähnlich wie Webcasts, zu einigen Interessanten Themen und auch sonst viel Wissen.
Das besondere: Wenn man jetzt bis Oktober einige der Codeclips ansieht, kann man ein Visual Studio 2005 kostenlos bekommen!
Lange danach gesucht, und nun endlich gefunden:
Es gibt einen
kostenlosen grafischen Editor für MSBuild Files.
Er heißt
MSBuild Sidekick und sieht recht vielversprechend aus...
Notiz für mich:
Man braucht nicht stundenlang suchen, und es dann doch nicht finden, sondern man kann für den Script Explorer alternativ auch einfach STRG+ALT+N drücken.
Oder auf Tools->Customize->Commands dort links Debug suchen und rechts den Script Explorer.
Mit dem kann man dann wunderbar auch Javascript debuggen. Mit Breakpoints, IntelliSense und allem anderen was man so gewohnt ist.
Ach so und vorher nicht vergessen im IE "Script debugging deaktivieren" abschalten.
Nach weiteren Tests unterstützt mein neuer SourceSafe Client nun quasi alle Funktionen, die der VSS WebService bietet.
Einiges ist mir zwar noch nicht ganz klar, aber das wird schon noch...
Damit von dem Projekt noch ein paar mehr Leute was mitbekommen, hab ich einen Workspace auf
GotDotNet.com eingerichtet.
Hier zu finden:
http://workspaces.gotdotnet.com/SourceSafeClientWenn ich die GUI soweit habe, dass sie auch andere Leute verstehen, gibts ne erste Alpha im GotDotNet Workspace.