weidazhao / Hosting

Hosting prototype
170 stars 35 forks source link

servicefabricservicemodel.dll not included in package #17

Closed attilaersek closed 8 years ago

attilaersek commented 8 years ago

Hi!

This issue is more like a question than an actual bug in your code. The Microsoft.ServiceFabric.Services and Microsoft.ServiceFabric.Actors nuget packages versioned 2.0.135 and 2.0.217 contain an extra assembly: servicefabricservicemodel.dll which is not added as reference in the nuspec definition. It is definitely an incorrectly added extra reference and althoug VS2015 copies this assembly to the project output, the dotnet cli does not. The application's services will fail to start on the fabric.

Do you have any idea how to workaround this until the corresponding nuget packages are fixed? I've started experimenting with wrapping this dll in a dummy project, something like this:

  "frameworks": {
    "net452": {
      "bin": {
        "assembly": "libs\\servicefabricservicemodel.dll"
      },
      "dependencies": {
      }
    }
  },

Thanks! Attila.

weidazhao commented 8 years ago

It seems that the sample doesn't hit any path that requires the servicefabricservicemodel.dll to load, so I didn't find this issue before. Thanks for reporting the bug. I've reported the issue to the owner to fix it in the nuspec of the package.

If wrapping the dll works for you, please go ahead. You also could copy the assembly from %userprofile%.nuget\packages\Microsoft.ServiceFabric.Services\2.0.135\lib\net45 as a postpublish step defined in project.json file. (didn't try it myself though)