Cannot open MP 1 solution in VS2008 (1 Viewer)

komita

Portal Member
August 19, 2011
32
2
Home Country
Well since I was having problems compiling the code in VS2010 I gave VS2008 a shot thinking it would work flawless.
I installed: VS2008 SP1 + C++ security update -> Download details: Visual Studio 2008 Service Pack 1 ATL Security Update
as suggested by another thread with this issue but I am still unable to open the solution, getting an error that the solution had been created in a newer version of the application.

The VS2008 version is Version 9.0.30729.1 SP can somebody confirm if I have the correct version please?
 

komita

Portal Member
August 19, 2011
32
2
Home Country
Seems a few other people had it on the forums, and there were a few possible solutions presented but seems none of them worked for me.

Error 4 Could not load file or assembly 'file:///C:/svnroot/mediaportal/trunk/mediaportal/MediaPortal.Base/BassRegistration.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Line 2293, position 5. C:\svnroot\mediaportal\trunk\mediaportal\Configuration\Sections\PluginsNew.resx 2293 5 MediaPortal.Configuration

I guess its that ResGen.exe problem on a 64-bit Win 7 with VS2010.

THIS was one of the suggested workarounds but I didnt work for me. (unless I didnt put the code in the right place)

If anyone has gone through the above process can you please give me a step by step instruction on one of these "steps" since I am not sure what the right way is:
1. Adding <ResGenToolArchitecture>Managed32Bit</ResGenToolArchitecture> to a PropertyGroup in the project file of any project that generates resources targeting .NET 3.5 – since the corflags trick affects the bitness of ResGen.exe on a system-wide level, the property must be set for all affected projects as well.

2. OR If running MSBuild.exe directly, passing it using the global property switch: ‘/p:ResGenToolArchitecture=Managed32Bit’

3. OR Setting it as an environment variable in the command window that MSBuild.exe is run from or the VS 2010 IDE is opened from: ‘set RESGENTOOLARCHITECTURE=Managed32Bit’

There is always something .. :mad:
 

Migue

Retired Team Member
  • Premium Supporter
  • January 27, 2006
    381
    305
    Florida
    From the article I did this:
    Make ResGen.exe 32-bit by:

    1. Cd “%ProgramFiles(x86)%\Microsoft SDKs\Windows\v7.0A\Bin”

    2. Corflags /32Bit+ /Force ResGen.exe

    and

    Setting it as an environment variable in the command window that MSBuild.exe is run from or the VS 2010 IDE is opened from: ‘set RESGENTOOLARCHITECTURE=Managed32Bit’

    To do this last part I went into Control Panel - System - Advanced system settings - Environment Variables
     

    komita

    Portal Member
    August 19, 2011
    32
    2
    Home Country
    Sweet! You are a life saver my friend! Thank you!

    Got it to compile, all looks good, though when running it in debug it freeses when I click to open the configuration menu (since that is the first thing that pops up) the JIT debug shows it fails on the localization.

    line: _languageStrings = new Dictionary<string, Dictionary<int, StringLocalised>>

    in MediaPortal.Localisation.LocalisationProvider

    but I did all this in a hurry so maybe I didn't do something right, I'll double check later on when I'm done running some errands.


    EDIT:

    Ok THIS Posting led me to THIS posting which led me to the solution for the problem mention just above in case anybody else is looking.
     

    mattjcurry

    Retired Team Member
  • Premium Supporter
  • October 24, 2011
    261
    207
    44
    Thanks for the hint, but when I follow the instructions above, I get the following:

    Build started.
    Error TRK0002: Failed to execute command: ""D:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\ResGen.exe" /useSourcePath /r:E:\Projects\mediaportal\MediaPortal-1\mediaportal\MediaPortal.Base\Bass.Net.dll /r:E:\Projects\mediaportal\MediaPortal-1\mediaportal\MediaPortal.Base\BassRegistration.dll /r:E:\Projects\mediaportal\MediaPortal-1\mediaportal\MediaPortal.Base\BassVisAPI.Net.dll /r:E:\Projects\mediaportal\MediaPortal-1\Common-MP-TVE3\Common.Utils\bin\Debug\Common.Utils.dll /r:E:\Projects\mediaportal\MediaPortal-1\mediaportal\Core\bin\Debug\Core.dll /r:E:\Projects\mediaportal\MediaPortal-1\mediaportal\MediaPortal.Base\CSScriptLibrary.dll /r:E:\Projects\mediaportal\MediaPortal-1\mediaportal\Databases\bin\Debug\Databases.dll /r:E:\Projects\mediaportal\MediaPortal-1\Common-MP-TVE3\DirectShowLib\bin\Debug\DirectShowLib.dll /r:E:\Projects\mediaportal\MediaPortal-1\mediaportal\RemotePlugins\Remotes\X10Remote\Interop.X10.dll /r:E:\Projects\mediaportal\MediaPortal-1\mediaportal\MediaPortal.Support\bin\Debug\MediaPortal.Support.dll "/r:C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.Direct3D.dll" "/r:C:\WINDOWS\Microsoft.NET\DirectX for Managed Code\1.0.2902.0\Microsoft.DirectX.dll" /r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\mscorlib.dll /r:E:\Projects\mediaportal\MediaPortal-1\mediaportal\RemotePlugins\bin\Debug\RemotePlugins.dll /r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.configuration.dll "/r:C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\v3.5\System.Core.dll" /r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Data.dll /r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.dll /r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Drawing.dll /r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Management.dll /r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Runtime.Serialization.Formatters.Soap.dll /r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.ServiceProcess.dll /r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll /r:C:\Windows\Microsoft.NET\Framework\v2.0.50727\System.Xml.dll /r:E:\Projects\mediaportal\MediaPortal-1\mediaportal\Utils\bin\Debug\Utils.dll /compile ConfigSplashScreen.resx,obj\x86\Debug\MediaPortal.Configuration.ConfigSplashScreen.resources Properties\Resources.resx,obj\x86\Debug\MediaPortal.Configuration.Properties.Resources.resources Sections\BaseFileExtensions.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.BaseFileExtensions.resources Sections\BaseShares.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.BaseShares.resources Sections\BaseViews.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.BaseViews.resources Sections\DVD.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.DVD.resources Sections\DVDCodec.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.DVDCodec.resources Sections\DVDPlayer.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.DVDPlayer.resources Sections\DVDZoom.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.DVDZoom.resources Sections\Filters.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.FiltersSection.resources Sections\FiltersDScalerAudio.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.FiltersDScalerAudio.resources Sections\FiltersDScalerVideo.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.FiltersDScalerVideo.resources Sections\FiltersEncoder.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.EncoderFiltersSection.resources Sections\FiltersInterVideoEncoder.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.FiltersInterVideoEncoder.resources Sections\FiltersMonogramAACDecoder.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.FiltersMonogramAACDecoder.resources Sections\FiltersMpeg2DecAudio.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.FiltersMPEG2DecAudio.resources Sections\FiltersMpeg2DecVideo.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.FiltersMPEG2DecVideo.resources Sections\FiltersPowerDVDDecoder.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.FiltersPowerDVDDecoder.resources Sections\FiltersPureVideoDecoder.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.FiltersPureVideoDecoder.resources Sections\FiltersVideoRendererConfig.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.FiltersVideoRenderer.resources Sections\FiltersWinDVD7Decoder.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.FiltersWinDVD7Decoder.resources Sections\General.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.General.resources Sections\GeneralAutoplay.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GeneralAutoplay.resources Sections\GeneralCDSpeed.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GeneralCDSpeed.resources Sections\GeneralDaemonTools.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GeneralDaemonTools.resources Sections\GeneralDynamicRefreshRate.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GeneralDynamicRefreshRate.resources Sections\GeneralKeyboardControl.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GeneralKeyboardControl.resources Sections\GeneralKeys.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.Keys.resources Sections\GeneralStartupResume.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GeneralStartupResume.resources Sections\GeneralVolume.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GeneralVolume.resources Sections\Gui.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.Gui.resources Sections\GuiControls.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GuiControls.resources Sections\GuiFileMenu.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GuiFileMenu.resources Sections\GuiLanguage.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GuiLanguage.resources Sections\GuiOSD.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GuiOSD.resources Sections\GuiScreensaver.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GuiScreensaver.resources Sections\GuiSkipSteps.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GuiSkipSteps.resources Sections\GuiThumbs.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.GuiThumbs.resources Sections\MovieCodec.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.MovieCodec.resources Sections\MovieDatabase.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.MovieDatabase.resources Sections\MoviePlayer.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.MoviePlayer.resources Sections\MovieZoom.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.MovieZoom.resources Sections\Movies.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.Movies.resources Sections\Music.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.Music.resources Sections\MusicASIO.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.MusicASIO.resources Sections\MusicDSP.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.MusicDSP.resources Sections\MusicDatabase.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.MusicDatabase.resources Sections\MusicImport.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.MusicImport.resources Sections\MusicSort.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.MusicSort.resources Sections\PictureThumbs.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.PictureThumbs.resources Sections\Pictures.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.Pictures.resources Sections\PluginsNew.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.PluginsNew.resources Sections\Project.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.Project.resources Sections\Remote.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.Remote.resources Sections\RemoteUSBUIRT.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.RemoteUSBUIRT.resources Sections\RemoteWinLirc.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.RemoteWinLirc.resources Sections\TV.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.TV.resources Sections\TVClient.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.TVClient.resources Sections\TVCodec.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.TVCodec.resources Sections\TVDebugOptions.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.TVDebugOptions.resources Sections\TVTeletext.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.TVTeletext.resources Sections\TVZoom.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.TVZoom.resources Sections\ThirdPartyChecks.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.ThirdPartyChecks.resources Sections\Weather.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.Weather.resources SettingsForm.resx,obj\x86\Debug\MediaPortal.Configuration.SettingsForm.resources Subdialogs\DlgConfigModeHint.resx,obj\x86\Debug\MediaPortal.Configuration.DlgConfigModeHint.resources Subdialogs\DlgMovieConflicts.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.DlgMovieConflicts.resources Subdialogs\DlgMovieList.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.DlgMovieList.resources Subdialogs\DlgMpcSubs.resx,obj\x86\Debug\MediaPortal.Configuration.MpcHcSubsForm.resources Subdialogs\DlgProgress.resx,obj\x86\Debug\MediaPortal.Configuration.Sections.DlgProgress.resources Subdialogs\EditShareForm.resx,obj\x86\Debug\MediaPortal.Configuration.EditShareForm.resources Subdialogs\EditWeatherCityForm.resx,obj\x86\Debug\MediaPortal.Configuration.EditWeatherCityForm.resources Subdialogs\ParameterForm.resx,obj\x86\Debug\MediaPortal.Configuration.ParameterForm.resources Subdialogs\SearchCityForm.resx,obj\x86\Debug\MediaPortal.Configuration.SearchCityForm.resources". The handle is invalid.
    Build failed. (00:00:00.9390939)

    If I unset the 32bit flag using corflags, then I get this:
    Build started.
    E:\Projects\mediaportal\MediaPortal-1\mediaportal\Configuration\Sections\PluginsNew.resx(2293,5) : Error RG0000: Could not load file or assembly 'file:///E:/Projects/mediaportal/MediaPortal-1/mediaportal/MediaPortal.Base/BassRegistration.dll' or one of its dependencies. An attempt was made to load a program with an incorrect format. Line 2293, position 5.
    Build failed. (00:00:01.5851585)
     

    Users who are viewing this thread

    Top Bottom