2

I'm having a very frustrating issue where my SP2010 project in VS2010 where everything seems to be perfectly normal when I build/rebuild the solution, but when I go to "Package" the SP2010 project, though it builds and deploys successfully, one of the dependent assemblies loses one of its references to a different project in the solution - which also causes a run-time error.

Does anyone know of any additional build steps that occur when selecting Deploy/Package on a SP2010 project, or anything else that could be causing this to stop working?

Just confused as to why a build/rebuild causes no issues (in both Debug and Release configurations), but a Package/Deploy breaks...

For example:

Solution built (no problems)

alt text

After Package/Deploy

alt text

Henry C
  • 4,781
  • 4
  • 43
  • 83
  • 1
    It turns out that the run-time error was unrelated, and while the solution does still need a rebuild to remind itself that yes, it can find those references, everything is working now...but still very mysterious. – Henry C Oct 06 '10 at 03:40
  • Did you ever fix the problem with the references? I am having the same problem. It's all fine when I rebuild but it's annoying to lose the intellisense everytime I do a Deploy. – Jaap Feb 13 '12 at 14:21
  • No, unfortunately - I also haven't seen it since, so it remains a complete mystery to me :/ – Henry C Feb 13 '12 at 18:15

2 Answers2

1

You may try this (it has just worked for similar problem) to solve the reference problem in deployment :

Edit your .package file in Visual Studio and, under the "advanced" tab, Edit each additional assembly reference. Ensure there is only one occurrence of the assembly in the "source project" combo box. Else, try to change the selected line.

Sometimes the packager just loses references...

PtiTom
  • 11
  • 1
1

May be in your case if you are using a Third Party assembly or a Project reference in the project then you need to explictly add them to the Package. Please refer this link for more details.

Community
  • 1
  • 1
Kusek
  • 5,384
  • 2
  • 25
  • 49
  • Hi Kusek, I did already add all referenced .dlls through the Advanced section in the Package Explorer (otherwise my solution wouldn't work), but still has the same behaviour post package/deploy. – Henry C Oct 06 '10 at 04:04