1. Aron Cox
  2. SnapDevelop
  3. Monday, 29 June 2020 14:40 PM UTC

I have been playing with SnapDevelop. I have a dll I wrote in C# .NET Framework Standard which fails to compile after opening the solution in SnapDevelop, even though it works just fine in Visual Studio 2017 and 2019. The error is gives is:

Please check to make sure that you have specified a valid combination of Configuration and Platform for this project. Configuration='Debug' Platform='AnyCPU'. You may be seeing this message because you are trying to build a project without a solution file, and have specified a non-default Configuration or Platform that doesn't exist for this project. PBUtils Microsoft.Common.CurrentVersion.targets 780

Now I think the reason is because this has to be an x86 project, and SnapDevelop appears to only handle AnyCPU projects. Is this correct? I created a brand new project in SnapDevelop and it would only let me select a platform of AnyCPU.

I tired removing all platforms other than x86 from Visual Studio and then opening the solution in SnapDevelop, where it reports x86 as the Solution Platform, and the Platform Target in the project properties says x86, but I still get the same error on build.

I learnt some years ago that I had to use x86 for my dll as certain things, I've forgotten which, failed under AnyCPU. I do remember it took me quite a while to work othat out!

Any help welcome :)

Thanks!

Aron Cox Accepted Answer Pending Moderation
  1. Tuesday, 30 June 2020 08:15 AM UTC
  2. SnapDevelop
  3. # 1

Okay I managed to get my dll to build by removing the test project and the post build bat file. I have the project properties Platform set to "Any CPU" because that is the only choice I have, which doesn't seem right, and the Platform target set to "x86".

If I add the second project, which contains some nunit tests, back in then it fails to build, I can't see anything particularly strange with the second project so no idea what's going on.

I don't understand why it was building just fine in Visual Studio and not in SnapDevelop, which as far as I can tell is a version of Visual Studio, but at least I have something working for now.

I tried manuallty editing the solution and project files to try and get more Solution Platform choices, but it didn't help.

Comment
  1. Logan Liu @Appeon
  2. Wednesday, 1 July 2020 14:27 PM UTC
Hi Aron,

Could you help to provide a sample project that can duplicate your issue? You can also report a bug in the Appeon Standard Support at https://www.appeon.com/standardsupport/.

BTW: please notice that SnapDevelop is designed for the .NET Core. And the .NET Framework project is not supported.

Regards,

Logan
  1. Helpful
  1. Aron Cox
  2. Wednesday, 1 July 2020 15:13 PM UTC
Thanks Logan. My dll is written in .NET Framework not .NET Core, so maybe that is the issue. I ran the checker from Microsoft to see if it was easily convertible to .NET Core, but when I tried converting I got into trouble with my nunit tests for some reason I didn't understand. There's a lot of code in the dll, and a lot of tests. So I removed the tests and then could compile just fine in SnapDevelop, and it worked, at least one of my simple methods worked with Snap Develop, even though it was .NET Framework still. I could call it from PowerBuilder 2019 R2 and debug through the C# code.



So I just created a new .NET Core solution and project in SnapDevelop. I still don't have anything other than "Any CPU" in the toolbar menu dropdown, and the top dropdown in the Build properties,and as before I can change the Platform target to x86. I don't understand why I can't change this everywhere else like I do in Visual Studio but it does seem to build it as an x86 dll.



However it appear SnapDevelop does not work with nunit which is a problem, as I don't want to rewrite the thousands of test I've already written.



It seems SnapDevelop is not really a full C# package, for exampel, I can't seem to install the nunit test adapter, and PowerBuilder can only call very simple methods in dlls. It's all a little disppointing so far. The ability to debug C# code from PowerBuilder easily would have been great, but I guess it's not going to happen. I think I'm going to have to stick to building my dll as an Active/X control :(



  1. Helpful
There are no comments made yet.
Govinda Lopez @Appeon Accepted Answer Pending Moderation
  1. Monday, 29 June 2020 19:05 PM UTC
  2. SnapDevelop
  3. # 2

Hi Aron,

 

Try Right-clicking on the project level instead of at the solution. Then click on "Properties" (or click "Alt"+"ENTER"). Then go to the left panel option "Build". You can modify the "Platform Target" there to "x86".

 

I hope this helps!

 

Regards,

 

 

Comment
  1. Aron Cox
  2. Tuesday, 30 June 2020 06:59 AM UTC
Thanks, but I have already set that to x86, it;s the only place where I have the option of x86 the other two places only contain "Any CPU". I did this System.Reflection.AssemblyName.GetAssemblyName(string assemblyFile) and checked the Processor Architecture and it has been build as x86, however that doesn't explain why my actual dll, the one I already use with PowerBuilder as an Active\X control, doesn't build in SnapDevelop. I will do some more experimenting.
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Monday, 29 June 2020 15:05 PM UTC
  2. SnapDevelop
  3. # 3

The default project compilation setting is AnyCPU but you can change to 64-bit or 32-bit only.

Comment
  1. Aron Cox
  2. Monday, 29 June 2020 15:25 PM UTC
Thanks Armeen, then why the error message on a working Visual Studio project???



My just created library in SnapDevelop, never been in Visual Studio, only allows me to select a platform of AnyCPU, I can change the Platform target to x86, but in the menu bar it says Debug Any CPU and in the Project Properties it says Configuration: Debug, Platform: Any CPU, and if I drop either of those down there is nothing but Any CPU in either of the dropdown lists. When I build it says:



1>------ Rebuild started: Project: DebugTest.csproj, Configuration: Debug AnyCPU ------

DebugTest -> C:\Dev\SnapDevelop\DebugTest\DebugTest\bin\Debug\netstandard2.0\DebugTest.dll

========== Rebuild: 1 succeeded, 0 failed, 1 up-to-date, 0 skipped ==========



Which makes me think setting Platform Target to x86 didn't do anything. I am using to being able to configure these myself in Visual Studio, but it seems I can't in SanpDevelop. I can't make even a newly created solution x86 in SnapDevelop as far as I can tell.



This is SnapDevelop 2019 R2 Build 2323.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.