locked
Different references in CF project? RRS feed

  • Question

  • I have a problem at the proxy generation stage with a service I have written. For the desktop version the project has a reference to the game controller. However, for the CF version of the project (generated from the desktop version using dssnewservice /gcfp) I have removed the reference to the game controller because there is no such DLL for CF. I have conditionalized all the code so that none of the game controller code is included in the CF version.

     

    However, when I compile all of the code compiles clean but then at the proxy generation stage I get this error:

     

    Warning 1 Could not resolve this reference. Could not locate the assembly "cf.GameController.Y2006.M09.Proxy". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. cf.DriveByWire

    I don't have a reference to cf.GameController.Y2006.M09.Proxy in my CF project. I believe it has been automatically created during the proxy generation process. The second error shows that it is creating the proxy from the original project, not the CF version (which should be cf.DriveByWire.Y2008.M01.dll).

     

    Error 2 The command ""C:\Microsoft Robotics Studio (1.5)\bin\DssProxy.exe" /dll:"C:\Microsoft Robotics Studio (1.5)\bin\DriveByWire.Y2008.M01.dll" /proxyprojectpath:"C:\Microsoft Robotics Studio (1.5)\ProMSRS\Chapter4\DriveByWire\Proxy " /keyfile:"C:\Microsoft Robotics Studio (1.5)\samples\mrisamples.snk"  /gcfp /binpath:". " /referencepath:"C:\Microsoft Robotics Studio (1.5)\bin\ " /referencepath:"C:\Microsoft Robotics Studio (1.5)\bin\ " /referencepath:"C:\Microsoft Robotics Studio (1.5)\bin\ " /referencepath:"C:\Microsoft Robotics Studio (1.5)\bin\ " /referencepath:"C:\Microsoft Robotics Studio (1.5)\bin\ " /referencepath:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ " /referencepath:"C:\Microsoft Robotics Studio (1.5)\bin\ " /referencepath:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ " /referencepath:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ " /referencepath:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ " /referencepath:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ " /referencepath:"c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\ "" exited with code 20. cf.DriveByWire

    So the question is quite simple:

    Is it possible to have different references in a desktop project and a CF project? If so, how?

     

    Trevor

     

    Wednesday, February 13, 2008 9:07 AM

Answers

  • Hi Marc and George,

     

    If I read your responses correctly, it seems that what I want to do is not possible. If DssProxy exits with code 20, does it generate the proxy properly?

     

    I ended up taking out the game controller altogether just so that the CF version would build OK. However, I really want the game controller so I guess I will have to split it into two projects -- one with, and one without just to build the CF version.

     

    Trevor

     

     

    Thursday, February 14, 2008 4:41 AM

All replies

  • I also had this problem. However, despite the error message, the compact framework proxy builds correctly.

    It seems that the compact framework proxy is built only from the original project, and that compact framework references are generated from the original project, by adding a "cf." prefix.
    If you look at the PostBuildEvents properties, you will see that there is one only for the full framework project.
    This project file is imported in the cf project file, so both versions are built from the cf project.

    So my guess would be that the warning returned by the compiler when building the cf proxy is translated to an error code in dssproxy.exe.

    I'm not sure of all that it implies, but wouldn't it be simpler to separate the project files for each framework version, and have DssProxy handle either full framework or compact framework, but not both at the same time?

    Wednesday, February 13, 2008 6:24 PM
  • Unfortunately, we can use DssProxy to reflect the metadata in a CF service. So we require that you must have a full .NET service *and* a CF version of the same service using the same code files, so we can reflect the .NET one, generate proxies, then we generate CF versions of the proxies and transforms.

     

    The references for the CF version of the service could have CF assemblies as additional references but i have to admit we have not explicitly tried that. Every reference we added to a CF service, was also present, with its .NET equivalent, in the .NET version of the service

     

    Wednesday, February 13, 2008 8:59 PM
  • Hi Marc and George,

     

    If I read your responses correctly, it seems that what I want to do is not possible. If DssProxy exits with code 20, does it generate the proxy properly?

     

    I ended up taking out the game controller altogether just so that the CF version would build OK. However, I really want the game controller so I guess I will have to split it into two projects -- one with, and one without just to build the CF version.

     

    Trevor

     

     

    Thursday, February 14, 2008 4:41 AM
  • Good morning..

     

    First off I am NOT a professional programmer and I do not have a answer for you.

     

    However with my limited knowledge I receive the following error (in general) just loading some services in VPL or using C#.

     

    Just my guess... but as I see it (with my limited knowledge) some of the DLL's in the Microsoft Robotics 1.5 are version (using properties) 0.0.0.0. and the code generated wants something else.

     

    Using VPL, In .Diagram. load only the DesktopJoystick and press F5. VPL will display the following type of error.

     

    I guess VPL wants version 1.5.507.0 DLL's. I  get the same type error when using the SimpleDashboard.

     

    In studio 1.5 there is a mix of version 0.0.0.0 and 1.5.507.o DLL's.

     

    I have no idea how to correct this. Maybe some of the smart folks can give a solution? I'm not even coding. Just using one service and Run it... Guess I'll have to try all the services and see if there are others with the same problem. Or am I the problem?

     

     

      <?xml version="1.0" encoding="utf-8" ?>
    - <InterpreterState xmlnsTongue Tied="http://www.w3.org/2003/05/soap-envelope" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlnsBig Smile="http://schemas.microsoft.com/xw/2004/10/dssp.html" xmlns="http://schemas.microsoft.com/robotics/2006/05/modelinterpreter.html">
      <Path>/model/application</Path>
      <Tag>70dfee45-2f8d-43e4-bb34-d428c8f61b1e</Tag>
    - <DebuggerState>
      <Debugging>true</Debugging>
      <Mode>Running</Mode>
      <Breakpoints />
      <Pending />
      </DebuggerState>
      <Status>LoadFault</Status>
      <Description>Unable start configured partners</Description>
    - <Fault>
    - <s:Code>
      <s:Value>s:Receiver</s:Value>
      <sTongue Tiedubcode />
      </s:Code>
    - <s:Reason>
      <s:Text>System.IO.IOException: Code:W3C.Soap.FaultCode,Subcode:unknown,ReasonTongue Tiedystem.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.FileLoadException: Could not load file or assembly 'GameController.Y2006.M09.Proxy, Version=1.5.507.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) File name: 'GameController.Y2006.M09.Proxy, Version=1.5.507.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' at Microsoft.Robotics.Services.Sample.JoystickForm.JoystickFormService..ctor(DsspServiceCreationPort creationPort) WRN: Assembly binding logging is turned OFF. To enable assembly bind failure logging, set the registry value [HKLM\Software\Microsoft\Fusion!EnableLog] (DWORD) to 1. Note: There is some performance penalty associated with assembly bind failure logging. To turn this feature off, remove the registry value [HKLM\Software\Microsoft\Fusion!EnableLog]. --- End of inner exception stack trace --- at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType) at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType) at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at Microsoft.Dss.Services.Constructor.ConstructService.InvokeServiceClassConstructor() at Microsoft.Dss.Services.Constructor.ConstructService.ReflectAndConstructService(ServiceCache Cache)</s:Text>
      </s:Reason>
      </Fault>
      <Instances />
      </InterpreterState>
     
    Have a GREAT DAY!
     
    Sunday, February 24, 2008 4:18 PM
  • it looks like XNA and DirectX9.0 are not properly installed on your system. I would try re-installing them individually (the installation packages for them should be in your MSRS installation folder, under external.

     

    if you have still issues, please start a new thread in the Hardware and Troubleshooting sub-forum. Btw, if you search for GameController in that forum you will see lots of similar posts. For some reason, DirectX sometimes fails to install but in all cases so far this has not been an MSRS issue, but an external dependency issue

     

    Monday, February 25, 2008 6:11 PM