locked
Self Service Portal Development RRS feed

  • Question

  • Hi,
     
    I've installed the Self Service Portal of MDM and wanted to try some experiments with development on it, but when I copy the supplied files (%PROGRAM_FILES%\Microsoft System Center Mobile Device Manager Serlf Service Portal\) to my computer and open the project in Visual Studio 2008 SP1, I get the following error (after conversion to 2008):

    Error   1   The command ""\SDK\v2.0\Bin\xsd.exe" SelfServiceConfiguration.xsd /c /l:cs /nologo /n:Microsoft.Mobile.ManagementServices.SelfServicePortal /o:Code" exited with code 3.    C:\Visual Studio 2008\Projects\Microsoft System Center Mobile Device Manager Self Service Portal\SelfServicePortal.csproj   268 5   SelfServicePortal 
    .
    .

    Has anyone encountered this before and has a possible solution to this?

    Thanks a lot,
    Rajen
    Tuesday, December 2, 2008 2:05 PM

Answers

  • Thanks to a colleague, I've detected the root of the problem:

    The SelfServicePortal.csproj file contains the following line:

        <Exec Command="&quot;$(VSINSTALLDIR)\SDK\v2.0\Bin\xsd.exe&quot; SelfServiceConfiguration.xsd /c /l:cs /nologo /n:Microsoft.Mobile.ManagementServices.SelfServicePortal /o:Code" WorkingDirectory="$(ProjectDir)" />
    .
    .

    The installation of Visual Studio 2008 does not have the xsd.exe in the $(VSINSTALLDIR)\SDK\v2.0\Bin directory, but in stead it is in the %WindowsSdkDir%\Bin directory (C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin in my case).

    For some reason, changing the csproj file to contain the following line in stead:

        <Exec Command="&quot;$(WindowsSdkDir)\Bin\xsd.exe&quot; SelfServiceConfiguration.xsd /c /l:cs /nologo /n:Microsoft.Mobile.ManagementServices.SelfServicePortal /o:Code" WorkingDirectory="$(ProjectDir)" /> 
    .
    .

    Does not seem to fix the error, as I still get a build error with it. Only when I put the absolute path in there like so:

        <Exec Command="&quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\xsd.exe&quot; SelfServiceConfiguration.xsd /c /l:cs /nologo /n:Microsoft.Mobile.ManagementServices.SelfServicePortal /o:Code" WorkingDirectory="$(ProjectDir)" /> 
    .
    .

    The project builds successfully in Visual Studio 2008.

    This does seem weird, as it should be able to read the WindowsSdkDir environment variable, but at least there's a solution.

    I haven't tested it in Visual Studio 2005, but I hope this helps people with the same build error. Thanks again for your help Andreas.
    Wednesday, December 3, 2008 1:34 PM

All replies

  • I haven't tested this before, but I did a quick check just now.

    - I installed the Self Service Portal to a working SCMDM server.
    - Copied the contents of the install dir to my workstation.
    - Converted the project - no errors.
    - Opened the solution - no errors.

    I get a build error however that is the same as your error though. But this is actually expected - quoting scmdm08_sspdevcustom.doc (in the Self Service Portal download):
    As soon as you adjust the portal, you must build a new version of the portal assembly, Microsoft.Mobile.ManagementServices.SelfServicePortal.dll. You can build the assembly by using Microsoft Visual Studio 2005, or you can open a Microsoft Visual Studio 2005 console and build the assembly by using a command-line option.
    If you copied the file to a development environment, copy the new version of Microsoft.Mobile.ManagementServices.SelfServicePortal.dll to the production environment folder and replace the original assembly file.
    The compiled assembly file, Microsoft.Mobile.ManagementServices.SelfServicePortal.dll, replaces the original .dll in the \Bin folder. To specify a different location, provide a folder location in the <OutputPath> tag in the .csproj file.


    I didn't test this out as I don't have Visual Studio 2005 readily, (and don't know if there's a workaround using VS2008), but I would guess it's the answer to your issue.
    Tuesday, December 2, 2008 2:55 PM
  • Hi Andreas,

    First of all, thanks for the quick reply.

    I did read that statement in the documention, but I figured that it was just there to notify people that they should actually build the project in Visual Studio (2005 or higher), as opposed to editing the ASP.NET pages manually through some kind of other editor. As far as I can tell, building the project will already build a new Microsoft.Mobile.ManagementServices.SelfServicePortal.dll.

    I believe the error as I described (and you are also seeing) has some other cause than having to build the project in Visual Studio 2005.
    Tuesday, December 2, 2008 3:13 PM
  • As far as I can tell by a quick browsing through my file system xsd.exe is not included in my Visual Studio 2008 install, and then the error would make sense. (And if this is the case it would make sense to state that you need VS2005.)
    Tuesday, December 2, 2008 3:52 PM
  • Hm, alright. I'll try it out tomorrow in a Virtual Machine and let you know. Thanks!
    Tuesday, December 2, 2008 6:49 PM
  • Thanks to a colleague, I've detected the root of the problem:

    The SelfServicePortal.csproj file contains the following line:

        <Exec Command="&quot;$(VSINSTALLDIR)\SDK\v2.0\Bin\xsd.exe&quot; SelfServiceConfiguration.xsd /c /l:cs /nologo /n:Microsoft.Mobile.ManagementServices.SelfServicePortal /o:Code" WorkingDirectory="$(ProjectDir)" />
    .
    .

    The installation of Visual Studio 2008 does not have the xsd.exe in the $(VSINSTALLDIR)\SDK\v2.0\Bin directory, but in stead it is in the %WindowsSdkDir%\Bin directory (C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin in my case).

    For some reason, changing the csproj file to contain the following line in stead:

        <Exec Command="&quot;$(WindowsSdkDir)\Bin\xsd.exe&quot; SelfServiceConfiguration.xsd /c /l:cs /nologo /n:Microsoft.Mobile.ManagementServices.SelfServicePortal /o:Code" WorkingDirectory="$(ProjectDir)" /> 
    .
    .

    Does not seem to fix the error, as I still get a build error with it. Only when I put the absolute path in there like so:

        <Exec Command="&quot;C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bin\xsd.exe&quot; SelfServiceConfiguration.xsd /c /l:cs /nologo /n:Microsoft.Mobile.ManagementServices.SelfServicePortal /o:Code" WorkingDirectory="$(ProjectDir)" /> 
    .
    .

    The project builds successfully in Visual Studio 2008.

    This does seem weird, as it should be able to read the WindowsSdkDir environment variable, but at least there's a solution.

    I haven't tested it in Visual Studio 2005, but I hope this helps people with the same build error. Thanks again for your help Andreas.
    Wednesday, December 3, 2008 1:34 PM