WPF App Build Error
See original GitHub issueApologies if I have missed a solution somewhere. I have searched through the current issue library and help docs.
I am experiencing a problem when building a WPF App project in VS2017. I have tried this on Windows 7 and Windows 10. I install VS2017 community edition, create a new 4.6.2 WPF App project and then add Realm from NuGet.
After this the project will not build. I get the following error:
Severity Code Description Project File Line Suppression State Error Unknown build error, ‘Binary format of the specified custom attribute was invalid.’
I am new to realm and I appreciate that this might be specific to my configuration so any pointers or things to check for would be beneficial.
I have also tried updating all packages that can be updated via NuGet and still experience the error.
Does anyone have any ideas?
Goals
Build a simple WPF App in VS2017 using Realm from NuGet
Expected Results
Build Succeeded
Actual Results
Severity Code Description Project File Line Suppression State Error Unknown build error, ‘Binary format of the specified custom attribute was invalid.’
C:\Windows\Microsoft.NET\Framework\v4.0.30319\Microsoft.WinFx.targets(268,9): error MC1000: Unknown build error, ‘Binary format of the specified custom attribute was invalid.’
Steps to Reproduce
- Open VS2017
- Create ‘WPF App’ Project (Target 4.6.2 - Does the same for 4.7 & 4.7.1 etc.)
- Add Realm from NuGet - wait for install to complete
- Build project - This is where I get the error
Code Sample
Version of Realm and Tooling
- Realm Object Server Version: N/A
- Flavor:
- Developer
- Professional
- Enterprise
- Server OS & Version: N/A
- Client SDK Version: Realm 2.1
- Client OS & Version: Windows 10 Pro (1709 - 16299.248)
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Just to add my team has run into the same issue which manifested when we tried to build a nuget package for a project using Realms 3.0.
When packaging nuget makes a call to CustomAttributeData.GetCustomAttributes which fails silently due to the ‘Binary format of the specified custom attribute was invalid.’ exception. Nuget.exe returns
For now we will have to downgrade to Realms 2.0, being able to package our libraries is essential.
I created another issue for this (#1758)