Remove service reference from a project

assaf.govassaf.gov Posts: 4
edited March 16, 2015 2:38PM in SmartAssembly
Hi,

I have a .Net C# project, and when i build my project i have problem to access one of my service reference through SilverLight,
I just wanted to remove this service reference.

How can I do it?

Comments

  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi Assaf,

    Thank you for your post!

    Apologies, can you kindly clarify-- is obfuscating your .NET C# project what breaks the call to your service? What particular errors are you getting when this happens? To remove the service reference, are you able to do this from your solution in Visual Studio as described here?

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • Hi jessica.ramos,

    Thanks for the replay, I think i wasnt clear enough.
    I dont want to remove the service reference from the project itself, I just want the SmartAssembly not to "Touch" it.
    I making connection to an old server from SilverLight and something there goes wrong, when I use the Debug version it works great.
    This exact code (that makes the problem) is very very old and I really dont want to touch it.

    Do you know the way to do it?
  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi Assaf,

    Ah I see, thanks for clarifying!

    Just to confirm, are you applying protection options (such as obfuscation, pruning, etc..) to the code that makes the connection? If that is what's touching the code and changing it so that it doesn't work anymore, you can use the custom attributes to exclude it from those features: http://documentation.red-gate.com/displ ... attributes

    Or on the other hand, is SmartAssembly changing the code and causing the problem even when you simply process your assembly with no protection options? If this is the case, can you please share any error messages you're getting when trying to connect to the service?

    Thank you!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


  • Thanks for your reply,

    Can you explain if we can disable obfuscation using project definitions and not custom attributes. This service is generated frequently. Service generation will remove all attributes so this solution isn't appropriate for us.
  • Jessica RJessica R Posts: 1,319 Rose Gold 4
    Hi Assaf,

    Apologies for not mentioning that! You can indeed exclude from obfuscation either by using the custom attributes *or* by adding the exclusions from your SmartAssembly project through the SmartAssembly UI via the "Exclusions" link button in the obfuscation section next to your assembly name(s).

    (When using the custom attributes though, they are only needed when you process your assembly through SmartAssembly so that it knows to skip over those types)

    Please let me know how you get on and if I'm still misunderstanding anything!

    Jessica Ramos | Product Support Engineer | Redgate Software

    Have you visited our Help Center?


Sign In or Register to comment.