SimpleStubs icon indicating copy to clipboard operation
SimpleStubs copied to clipboard

strong named version of dll

Open rupaparam opened this issue 6 years ago • 6 comments

Hi, Our solution has a strong named libraries which sometimes requires our test projects to be strong named as well. This makes it difficult to use Simplestubs as it is not a strong named dll. Would it be possible to release a strong named version of simplestubs?

Thanks, Rupa

rupaparam avatar May 06 '19 20:05 rupaparam

@rupaparam I will look into it when I guess a chance, hopefully soon.

nehmebilal avatar May 06 '19 21:05 nehmebilal

@rupaparam sorry for the delay. I was just trying to sign the assemblies in Visual Studio which required a strong name key file that I created using Visual Studio (pfx file). However, my understanding is that this pfx file should not be made public but the code doesn't compile without it.

Do you know what is a common workflow for signing assemblies for opensource code?

nehme-bilal-ah avatar May 26 '19 15:05 nehme-bilal-ah

Hi, I do not have experience signing open source assemblies. However we are using another open source assembly in our solution and the authors have checked in the public and private keys into github. Also here is a link to the Microsoft doc (https://docs.microsoft.com/en-us/dotnet/framework/app-domains/strong-named-assemblies) where they suggest to do the same.

You can also use the strong name tool provided by .net (sn.exe) to create a *.snk file with the keys. I have only use *.snk files to strong name sign an assembly.

Thanks, Rupa

From: Nehme [email protected] Sent: Sunday, May 26, 2019 8:26 AM To: microsoft/SimpleStubs [email protected] Cc: Rupa Paramasivan (Protingent Inc) [email protected]; Mention [email protected] Subject: Re: [microsoft/SimpleStubs] strong named version of dll (#58)

@rupaparamhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Frupaparam&data=02%7C01%7Cv-rupar%40microsoft.com%7C4dcf7e4fb3974154e6c808d6e1ee851d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636944811882301734&sdata=N50jwN4Uu%2BtikGASvOj97zfblv%2BjPouLlesEpsj6NuM%3D&reserved=0 sorry for the delay. I was just trying to sign the assemblies in Visual Studio which required a strong name key file that I created using Visual Studio (pfx file). However, my understanding is that this pfx file should not be made public but the code doesn't compile without it.

Do you know what is a common workflow for signing assemblies for opensource code?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2FSimpleStubs%2Fissues%2F58%3Femail_source%3Dnotifications%26email_token%3DAMACI23SHEMKIC2CJFJTRYDPXKT2FA5CNFSM4HLDGV6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWIH6SA%23issuecomment-496009032&data=02%7C01%7Cv-rupar%40microsoft.com%7C4dcf7e4fb3974154e6c808d6e1ee851d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636944811882301734&sdata=9tmDBYy6VxLonoEp%2FRmz%2FZKGEgafeqjvDbSQr1ljtxc%3D&reserved=0, or mute the threadhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAMACI2ZGNBN7QLHCFCJFOILPXKT2FANCNFSM4HLDGV6A&data=02%7C01%7Cv-rupar%40microsoft.com%7C4dcf7e4fb3974154e6c808d6e1ee851d%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636944811882301734&sdata=m1Ns7OIqUxm89nzqV2mhr%2FAxmbZ2GgdgzdocbUa21yw%3D&reserved=0.

rupaparam avatar May 29 '19 20:05 rupaparam

Please review nuget publishing policy in MS OpenSoruce: https://docs.opensource.microsoft.com/content/releasing/nuget.html

This is still an issue, especially if the stubs project contains access modifier like "internal", and if a test project wishes to access those internal classes or methods. It requires itself to be strong-named signed to use assembly:InternalVisibleToAttribute to establish a friend assembly.

mosunchao avatar Jan 27 '20 22:01 mosunchao

Sorry about this taking so long. I will try to find time to get it done soon.

nehmebilal avatar Feb 01 '20 09:02 nehmebilal