IOException in Rhapsody FMI - rhapsody

I'm trying to generate an FMU of a block in IBM Rational Rhapsody using it's FMI profile, but everytime I generate de FMU I get the following error:
FMUPlugin.OnMenuItemSelect ("FMU\Generate FMU")
Export menu
All Checks Terminated Successfully
Checker Done
0 Error(s), 0 Warning(s)
Code generated to directory: C:\Documents and Settings\markel.sainz\workspace_FMI\FMI_test2\block_1_MSVCDLL\FMU
Generating file cash_calculator.h (unmodified)
Generating file cash_calculator.cpp (unmodified)
Generating make file block_1_MSVCDLL.mak (unmodified)
Code Generation Done
0 Error(s), 0 Warning(s), 0 Message(s)
Building ------------ block_1_MSVCDLL.dll ------------
Executing: ""C:\Archivos de programa\IBM\Rational\Rhapsody\8.1\Share"\etc\msvcmake.bat block_1_MSVCDLL.mak build x86 VC10 "
Value of the property MSVC::IDEVersion corresponds to the version of Visual Studio.
VC9 - Visual Studio 2008
VC10 - Visual Studio 2010
VC11 - Visual Studio 2012
Current value is "VC10", but no Visual Studio installation was not found in the directory "".
Build Done
FMU generation failed!
FMI plugin cause: IOException thrown: Failed to rename the target file: C:\Documents and Settings\markel.sainz\workspace_FMI\FMI_test2\block_1_MSVCDLL\FMU\cash_calculator.dll
Any ideas of what is going on?
Thanks in advance.

I got this problem many times and at the end solved it according to many resources.
First, go to
C:\ProgramData\IBM\Rational\Rhapsody\8.1.1x64\Share\etc\msvcmake.bat
Then open the file and change
if "%4"=="VC10" set VS_PATH=%VS_2010_PATH%
to
if "%4"=="VC10" set VS_PATH=C:\Program Files (x86)\Microsoft Visual Studio 10.0
The path is where you installed the Microsoft Visual Studio 10.0.
The last step (many answers missed this): go to IBM Rational Rhapsody and open your project, then click "Build Framework" at the bottom of "Code" menu.
Then you're free to go!

Related

ALINK : error AL1019: Metadata failure while creating assembly -- The file or directory is corrupted and unreadable

I have an asp.net webform project that build on system1 but not on system2 (they both are windows 10 and visual studio 2022 Version 17.4.3) and when I build visual studio show an error in error list window :
"Severity Code Description Project File Line Suppression State
Error Metadata failure while creating assembly -- The file or directory is corrupted and unreadable. Modabber D:\BehsamanCode\Modabber\Modabber.Web\ALINK"
Also it shows this error in the output window :
"ALINK : error AL1019: Metadata failure while creating assembly -- The file or directory is corrupted and unreadable"
I searched these errors and I enabled long path on windows10 and uncheck Sign the assembly but not work.
What should we do?
I don't know how but it resolved. I think system2 hard drive has a problem and after win10 repair it itself then restart windows the problem gone and project builded.

Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))

This was a Visual Studio 2010 application converted to Visual Studio 2013.
The code is Working fine on Local Machine.
The same code is giving error on Server where Visual Studio 2013 is installed:
Invalid class string (Exception from HRESULT: 0x800401F3 (CO_E_CLASSSTRING))
There is an error in loading some specific plugin, whether the plugin required some settings in your config file or not. Check windows event log.
Try to run the following command from a DOS prompt:
marshal.exe /RegServer
You need to have machine-administrator privileges to run this command-line.
It is most likely that in the original application you had a line that looked like this :
EnvDTE80.DTE2 dte2 = (EnvDTE80.DTE2)System.Runtime.InteropServices.Marshal.
GetActiveObject("VisualStudio.DTE.10.0");
This line would have given you the DTE (or DTE2) object representing your visual studio IDE, but the use of
"VisualStudio.DTE.10.0"
gets only the instance of VS2010 and what you need is actually the 2013 version which will be:
"VisualStudio.DTE.12.0"
You can learn more here:
How to: Get References to the DTE and DTE2 Objects

When building for windows phone using VS.net cordova throws OsvCommonersion error

I have tried vs.net 2013 and 2015
when building a cordova app for windows phone I get the following error.
Severity Description Project File Line
Error 'System.Environment' does not contain a definition for 'OsvCommonersion' [F:\SDKMobile\MobileConsole2\bld\Debug\platforms\wp8\MobileConsole.csproj] MobileConsole2 Device.cs 72
I can't find any docs on this
Gary
I moved the node_modules out of the project directory and no longer get this error

Error while Embedding Excel sheet into VB.Net Form using Microsoft office spread sheet

I am using Visual studio 2012 & creating a VB.Net Windows Forms Application whereas i am trying to embed an excel sheet data into the form.
I have installed, Office web components 11. while dragging and dropping the Microsoft office spread sheet Item it says following error
Failed to import ActiveX control. Please ensure it is properly registered.
PFB snapshot.
*Build console:)*
------ Build started: Project: WindowsApplication7, Configuration: Debug Any CPU ------
COM Reference 'OWC11' is the interop assembly for ActiveX control 'AxOWC11' but was marked to be linked by the compiler with the /link flag. This COM reference will be treated as a reference and will not be linked.
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): warning MSB3284: Cannot get the file path for type library "7c0ffab0-cd84-11d0-949a-00a0c91110ed" version 1.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): error MSB3303: Could not resolve COM reference "0002e558-0000-0000-c000-000000000046" version 1.0. Object reference not set to an instance of an object.
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): warning MSB3284: Cannot get the file path for type library "7c0ffab0-cd84-11d0-949a-00a0c91110ed" version 1.0. Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED))
C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Microsoft.Common.targets(2015,5): error MSB3303: Could not resolve COM reference "0002e558-0000-0000-c000-000000000046" version 1.0. Object reference not set to an instance of an object.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Note: I am able to embed the excel sheet using VBA form in my system.
I am using Microsoft 2010.
It looks like you may be able to do your drag/drop, click ok, then rebuild and try to drag/drop again.
If that doesn't work then you may check out this guide from MS Here

Microsoft Visual Studio 2010 IDE is not opening

When I am opening the IDE Visual Studio 2010, it's showing the error
"Microsoft Visual Studio has encounter a problem and needs to close."
If you had files open contained unsaved changes, these changes might
be lost.
Check online for a solution and close the program
Close the program
Debug the program
Details
Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: devenv.exe
Problem Signature 02: 10.0.30319.1
Problem Signature 03: 4ba1fab3
Problem Signature 04: Microsoft.TeamFoundation.Common
Problem Signature 05: 10.0.0.0
Problem Signature 06: 5140b069
Problem Signature 07: 4b6
Problem Signature 08: 45
Problem Signature 09: System.MissingMethodException
OS Version: 6.0.6002.2.2.0.272.7
Locale ID: 1033
Additional information about the problem: LCID: 1033
Read our privacy statement:
http://go.microsoft.com/fwlink/?linkid=50163&clcid=0x0409
I'm using Windows Server 2008 R2.
Run your visual studio from command prompt with /safemode parameter.
Then disable every extension you've installed before, then re-run visual studio.
For example:
"D:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe" /safemode
It would be nice if you run you cmd as an admin.
Good luck

Resources