Error when building: Assembly Reference could not be resolved

Last post 03-10-2008, 1:31 PM by beano. 8 replies.
Sort Posts: Previous Next
  •  03-03-2008, 11:13 AM 22257

    Error when building: Assembly Reference could not be resolved

    When I add web references to my process, it works perfectly... I can call them in custom server events, and when I deploy, there's no error.

    When I run an instance of my process, no error too.

    However (yes, otherwise there wouldn't be any reason for me to create this thread), when I close Visual Studio, open my solution, and try to deploy, I get this: 

    Assembly Reference MyWebService could not be resolved. Please ensure the the assembly is registered correctly and exists on disk.

    The only thing I can do then is opening my process in code mode ("View Code" on the kprx file), remove all the references I added previously, save, and add them again using the Project Reference wizard.

    Moreover, I noticed that quite a long time ago but I can't remove web references from this same wizard once I've added them.

    Is someone facing the same issue?


    Please remember to change the thread status when a valid answer has been given
  •  03-03-2008, 11:30 AM 22259 in reply to 22257

    Re: Error when building: Assembly Reference could not be resolved

    I had this problem last week when referencing a DLL I had created. It was fiddly to remove because the old references kept coming back again. Managed to get it fixed in the end somehow by tinkering around. Sorry that's not really any help, just wanted to mention that I'd seen a similar thing. Might be a bug?
  •  03-03-2008, 11:45 AM 22260 in reply to 22259

    Re: Error when building: Assembly Reference could not be resolved

    Glad to see I'm not the only one :-)

    As you can imagine, googling for the error message didn't return anything. I suppose it's a pure K2 issue (Visual Studio is so widely used I can't imagine such an error remaining stealthy).


    Please remember to change the thread status when a valid answer has been given
  •  03-03-2008, 12:54 PM 22262 in reply to 22260

    Re: Error when building: Assembly Reference could not be resolved

    This might be a blind shot, but have helped me.

    Exit Visual Studio and take a backup of you .kprx file. Edit the original with Notepad or your favourite texteditor. Remove all references to your assembly file. You will know what xml parent element to remove (and not) in the context your reference is in. :-)

    Then open the project in Visual Studio and add the reference(s) again. Remember to check the "Copy" option (I don't have K2 in front of me so I don't remembe the exact name). Save the project and open the K2 Project References again to be sure that your reference is still there.

    If so, re-deploy and pray to the big K2 god... 

    Good luck!
     

  •  03-04-2008, 10:58 AM 22278 in reply to 22262

    Re: Error when building: Assembly Reference could not be resolved

    Hi Cato72,

    This is exactly my current technique, but when I close my solution and open it again, the problem is back. I have to do this every time I close Visual Studio. I only have three references, I couldn't imagine how boring it would be if I had dozens of those.

    Thanks anyway, it confirms there's no other workaround (yet I wonder why it works for you guys after just one "manual fix").

    I hope it will be logged as a bug. Besides, what's the best way to signal a bug? Is it best to open a support ticket or to report it here? Considering it's not so urgent...


    Please remember to change the thread status when a valid answer has been given
  •  03-04-2008, 11:35 AM 22280 in reply to 22278

    Re: Error when building: Assembly Reference could not be resolved

    If you think you have found a bug, open a ticket.  That is the only way to get something officially reported and tracked.

    That being said, what you are seeing seems curious.  It seems strange that the reference would come back after you remove it.  Did you add your references through the designer canvas icon for references?  Pre-SP1, the approach was to add references to the individual extender projects.  Now the supported way is to add them only through the icon on the designer canvas. 


    The statements and opinions made in my postings are my own, and do not reflect the opinions of SourceCode Technology Holdings, Inc. or its subsidiaries. All information is provided as is with no warranties, express or implied, and grants no rights or licenses.
  •  03-04-2008, 11:51 AM 22281 in reply to 22280

    Re: Error when building: Assembly Reference could not be resolved

    No David, the reference doesn't come back after I remove it. That would be REALLY strange. What happens is that if I add a reference (to a web service), then close VS, I get the error quoted on the top of this thread.

    Then, I can't do anything but removing it (in the XML code, otherwise it's still here). If I re-open VS, no problem, the reference is not here anymore.

    However I do need it! That's why I add it again. But then, if I close VS, and re-open, the refrence is lost again! (If I expand the extender projects, I see the references with the little "warning" logo).

    It's an infinite loop :-(


    Please remember to change the thread status when a valid answer has been given
  •  03-06-2008, 10:51 AM 22358 in reply to 22281

    Re: Error when building: Assembly Reference could not be resolved

    I got this "Assembly Reference could not be resolved" message too. I'm guessing it's related but when I first tried to add the web service reference I got a K2 error message dialogue box popping up saying:
    "Error HRESULT E_FAIL has been returned from a call to a COM component."
    when I clicked "OK" after discovering and selecting the web service.

    Googling that error message didn't bring back anything related specifically to k2.


    Also, removing the line from the KPRX file and adding the reference again produced an identical error :( 

  •  03-10-2008, 1:31 PM 22430 in reply to 22358

    Re: Error when building: Assembly Reference could not be resolved

    Should add the exception given when I click "View Details":

    System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
       at VSLangProj.References.Add(String bstrPath)
       at SourceCode.VisualStudio.NestedProjectNode.AddReference(Reference item)
       at SourceCode.VisualStudio.NestedProjectNode.OnAnyItemAdded(Object sender, ItemChangeEventArgs e)
       at SourceCode.Framework.PersistableContainerObject.OnAnyItemAdded(ItemChangeEventArgs e)
       at SourceCode.ProjectSystem.BuildProject.OnAnyItemAdded(ItemChangeEventArgs e)
       at SourceCode.Framework.PersistableContainerObject.OnItemAdded(ItemChangeEventArgs e)
       at SourceCode.Framework.PersistableObjectCollectionBase`2.Add(TItem item)
       at SourceCode.ProjectSystem.ReferenceCollection.Add(Reference item)
       at SourceCode.Workflow.Authoring.Process.AddReference(Reference reference)
       at SourceCode.Workflow.Authoring.Process.OnAnyItemAdded(ItemChangeEventArgs e)
       at SourceCode.Framework.PersistableContainerObject.OnItemAdded(ItemChangeEventArgs e)
       at SourceCode.Framework.PersistableObjectCollectionBase`2.Add(TItem item)
       at SourceCode.ProjectSystem.ReferenceCollection.Add(Reference item)
       at SourceCode.Workflow.Wizards.References.Project.ProjectReferenceCanvas.CanvasModalWindow_OKClicked(Object sender, ModalWindowButtonClickEventArgs e)

View as RSS news feed in XML