When I check out the latest source from one of the sample projects of Catel (Logviewer/CsvTextEditor) and I build my solution.
I get a lot of build errors.
All of these error are related to one error:
The name 'InitializeComponent' does not exist in the current context.
I've both tried to build the solution in Visual Studio 2017 (15.9.11) as well as Jetbrains Rider.
Can anyone help me with this issue?
Some of the libraries require .net core 3.0 (see https://github.com/dotnet/core-sdk) and might require VS 2019 prerelease.
Related
I've tried everything - I swear...
But now I am running out of ideas and need some expert help.
I've already been using Microsoft.Office.Interop.Excel in the past.
But now, something seems to have changed.
Whatever I am trying, I can't get rid of that dll-error:
System.InvalidCastException:
'Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass'
to interface type 'Microsoft.Office.Interop.Excel._Application'.
This operation failed because the QueryInterface call on the COM component for the
interface with IID '{000208D5-0000-0000-C000-000000000046}' failed due to the following error:
Error loading type library/DLL. (Exception from HRESULT: 0x80029C4A (TYPE_E_CANTLOADLIBRARY)).'
MY ENVIRONMENT:
My VS version:
Microsoft Visual Studio Community 2022 (64-bit) - Current Version 17.4.4
Interop.Excel version and path:
Microsoft Excel 16.0 Object Library
C:\WINDOWS\assembly\GAC_MSIL\Microsoft.Office.Interop.Excel\15.0.0.0__71e9bce111e9429c\Microsoft.Office.Interop.Excel.dll
Office:
I am using Office 365.
1. started from scratch
To exclude everything else, I've set up a completely new project with nothing in there apart from the using-directive. And... I get the same error (see screenshot: https://i.stack.imgur.com/ZZHFN.png).
2. added reference in different ways
I've added the reference from the COM list, but also tried to directly use the path - no difference.
checked the file location and version
The file is exactly where it should be.
I can't see any newer version of the DLL for download either.
updated to the latest .NET version
Nothing changed.
Do you have an idea how I could solve this error?
(Please be gracious with your answer - I had a few years programming break and am just starting up again...)
Have a good day!
Katrin
I don't have an off-the-shelf solution for this, but any problem in VS 2022 related to COM interop reeks of 32/64-bit issues. Here are some thoughts:
Are you using 32-bit office? Check: File => Account => About Excel, and see what it says in bold font at the top.
Are you building for AnyCpu, or are you targeting a specific architecture (x86/x64)?
You could also check the registry to see if your assembly is actually registered for the correct "bitness", i.e. the one matching Excel.
VS2022 defaults to 64-bit if you're building AnyCpu, as opposed to earlier (32-bit) versions of VS.
/Einar
Meanwhile, I switched to the NuGet package "ClosedXML", which works fine. This should work for others with the same problem too.
Hint: Before installing, check the hints on the ClosedXml Website. The installation doesn't work the usual way (FEB-23), but there's an easy solution.
Having upgraded VS2015 to SP1 my local project references in my solution could not be found. I set the project build order, rebuilt all the projects and also created a new solution but still bad references.
Any ideas please?
I resolved this by ensuring that the target .NET Framework for all the projects in the solution, that were referenced, were the same.
Make sure that you are running VS with administrator mode, then rebuild the entire solution.
I am attempting to convert the Microsoft.Health C# class library that is installed as part of the HealthVault SDK, using instructions provided here. After following these instructions, I get the following error when attempting to load the project into Visual Studio 2013.
"The project is targeting frameworks hat are either not installed or
are included as part of future updates to Visual Studio. See
http://go.microsoft.com/fwlink/?LinkId=287985"
Visiting the link takes me to .NET SDKs and Downloads. Once there, I have no clue on what needs to be done.
I do realize that one will have to leverage the Portable Class Library Contrib project to fill in some missing bits, especially code related to System.Security. This, I will deal with later.
Any one run into a similar problem?
Maybe so late but for those who have the same problem.
I had the same error in a project which was working perfect before updating VS2013 and finally after 3 hours looking for the source of the error I found that the error is about TargetFrameworkProfile.
In my case I sloved it like so:
Right click in the unloaded project in your solution and click Edit.
Find the TargetFrameworkProfile tag and set it as below:
<TargetFrameworkProfile>Profile78</TargetFrameworkProfile>
At a guess, this is because you need to specify the TargetFrameworkVersion and TargetFrameworkProfile properties in the project file. Compare the .csproj you are trying to create to a newly created PCL project file, and make sure that everything that's not specific to your project matches.
I ran into the same issue and got it resolved by installing the latest Visual Studio Update
I have .net project which I converted from VS 2010 to VS 2012. I am building a setup for the project through InstallShield Limited Edition but I get following error.
ISEXP : error : -5008: This 32-bit package cannot include 64-bit data. The 64-bit data may come from a merge module.
I have searched a lot but could not find any specific solution to my problem.
Any help will be appreciated.
I resolved this issue by removing the Visual C++ Runtime dependency on the project output. Here's how to do it:
(2)Specify applicaiton data / Files / right click on the primary output / dependencies from scan at build
There you can uncheck all dependencies that cause problem, Uncheck Visual C++ 10.0 CRT (x64)
Source
I also had a -6109 Internal Build error which was caused by a dependency. I just unchecked it there. It took me a whole business day to figure that cryptic stuff out. This is insane and frustrating for the least.
Liteservandroid is an application that is used as Http api/Restful api to connect to CouchDB from TouchDB. I got a sample project and when i tried to build the project, i got the following error.
Gradle: A problem occurred configuring project ':LiteServAndroid'.
Failed to notify project evaluation listener.
Configuration with name 'default' not found.
There were no pointing errors in the code section. Can any one help me to find a solution.
Thanks
Chinna
The first hint I see with your problem is that in August 2013 you are talking about TouchDB - and TouchDB name change was introduced as far back as January 2013. There are old projects sitting out there using out of date code.
Are you sure you are using the newer code base? Here is the direct link to the ListServAndroid project https://github.com/couchbaselabs/LiteServAndroid
I found Couchbase Lite to be a bit tricky to integrate. They have moved it all over to Android Studio for building and developing too... so that might be new learning also. Have you gotten the GrocerySync test application working?