Snowmint Budget .NET error

Questions about Wine on Linux
Locked
ramack
Newbie
Newbie
Posts: 2
Joined: Sun Jan 31, 2021 12:21 pm

Snowmint Budget .NET error

Post by ramack »

Newbie to WINE. My OS is Debian Buster(Stable) and I'm throwing an error while running Snowmint's Budget. .NET is installed and related to .NET.

The relevant section of the error log:

Code: Select all

System.TypeInitializationException: The type initializer for 'DevExpress.Utils.AppearanceObject' threw an exception. ---> System.NotSupportedException: This method explicitly uses CAS policy, which has been obsoleted by the .NET Framework. In order to enable CAS policy for compatibility reasons, please use the NetFx40_LegacySecurityPolicy configuration switch. Please see http://go.microsoft.com/fwlink/?LinkID=155570 for more information.
   at System.Security.SecurityManager.ResolvePolicy(Evidence evidence)
   at DevExpress.Data.Helpers.SecurityHelper.IsPermissionGranted(IPermission permission)
   at DevExpress.Utils.Design.DXAssemblyResolverEx.Init()
   at DevExpress.Utils.AppearanceObject..cctor()
   --- End of inner exception stack trace ---
   at DevExpress.Utils.AppearanceObject..ctor()
   at DevExpress.Utils.ToolTipControllerShowEventArgs..ctor(Control control, Object obj, Object dummy)
   at DevExpress.Utils.ToolTipController..ctor()
   at DevExpress.Utils.ToolTipControllerDefault..ctor()
   at DevExpress.Utils.ToolTipController.get_DefaultController()
   at DevExpress.XtraEditors.BaseControl..ctor()
   at DevExpress.XtraEditors.BaseEdit..ctor()
   at DevExpress.XtraEditors.TextEdit..ctor()
   at BudgetMainWindow.BUTransfer.InitializeComponent()
   at BudgetMainWindow.BUTransfer..ctor(BUBankAccount& DebitAccount, BUBankAccount& CreditAccount)
   at BudgetMainWindow.BUEnvelopeMatrix.ThisAccount_DragDrop(Object sender, DragEventArgs e)
Going to the "more info" URL in the error log:
https://docs.microsoft.com/en-us/previo ... dfrom=MSDN
Gives two options
You can avoid the warnings and errors by either:
Migrating to the .NET Framework 4 replacements for the obsolete calls.
- or -
Using the <NetFx40_LegacySecurityPolicy> configuration element to opt into the legacy CAS policy behavior.

So I guess my first question is which is the better of the two options above? I've cd'd around trying to locate the config file, but haven't been found an .XML. However, I'm not sure I'm looking in correct directory to add the opt in policy behavior.

Thanks,
jkfloris
Level 12
Level 12
Posts: 3141
Joined: Thu Aug 14, 2014 10:10 am

Re: Snowmint Budget .NET error

Post by jkfloris »

If this is the program, then you need to install .Net 3.5
Installing .Net can break other programs in your wineprefix. I recommend to create a separate prefix for this program.

Code: Select all

# Create a 32-bit wineprefix and use winetricks to install .Net 3.5
 WINEARCH=win32 WINEPREFIX=$HOME/Budget-net35 winetricks -q dotnet35

# Install Budget
 WINEPREFIX=$HOME/Budget-net35 wine BudgetWinSetup.exe

# Run Budget
 cd "$HOME/Budget-net35/drive_c/Program Files/Snowmint Creative Solutions/Budget/bin"
 WINEPREFIX=$HOME/Budget-net35 wine BudgetMainWindow.exe
Or you can try the program with Wine's built-in .Net (wine-mono)

Code: Select all

 WINEARCH=win32 WINEPREFIX=$HOME/Budget-mono wine BudgetWinSetup.exe
 cd "$HOME/Budget-mono/drive_c/Program Files/Snowmint Creative Solutions/Budget/bin"
 WINEPREFIX=$HOME/Budget-mono wine BudgetMainWindow.exe
ramack
Newbie
Newbie
Posts: 2
Joined: Sun Jan 31, 2021 12:21 pm

Re: Snowmint Budget .NET error

Post by ramack »

Probably because it was my first post, there was a huge delay from submitting the OP and it actually posting. In the mean time I was able to find a solution, which the same as jkfloris. Thanks for responding jkf!

Installing .Net 3.5 with winetricks stopped the error. Posts I read off site from WINEHQ mentioned creating a prefix, but not really understanding it, I have not created a prefix as of yet. I need to read up on it since I don't know how or where to do it.

So, for the short term, I'm marking this as solved. Starting Budget in WINE is much quicker than starting a VMWare guest then the program.
Locked