i have several components build in .net3.5 wich use crystal reports for creating reports:)
in my new .Net4.0 wpf ui i would use this components as i used it before in winforms. but it seems it is not possible-.
this line in the 3.5 component
rd.SetDataSource(_dsReport);
produce the following error in .net4.0
Error:Unbekannter Datenbank-Connector-Fehler
Fehler in der Datei C:\DOKUME~1\bereuter\LOKALE~1\Temp\temp_009c049c-ca48-4097-92c1-32031e24d297 {9AFAD195-922B-4ADB-AC34-DA5950821130}.rpt:
Unbekannter Datenbank-Connector-Fehler
anyone has a solution to use my old components in .Net4.0 enviroment?
after some googling i found the answer to my problem.
i have to add the following to my app.config:
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
and now all works like expected! :)
It looks like it is a connection error. Could you open the report and check if you can access the data from the report first.
Or you can try to create a simple report [without connecting to database] and see if it will work on your 3.5 component.
It could be something to do with different version of .Net Framework DLL do not like each other, in that case, you may need to migrate/ recompile the .net framework3.5 component to .Net4
Related
My project builds for my teammates, but not for me.
Project:
Errors:
I deleted reference to mscorlib fake, recreated Fake for System, but got the same error.
If I try to add reference to mscorlib, I get message:
A reference to
'C:\Windows\Microsoft.NET\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll'
could not be added. This component is already automatically referenced
by the build system.
I tried to add <Reference Include="mscorlib" /> to the project file, but this did not resolve the issue.
I use VS 2017.
Will appreciate any clue.
Thank you #Abhitej, for the answer. It resolved the issue. In addition to switching to higher version of framework I added tags like <Remove FullName="System.Security.Cryptography.CryptoStream"/> for each failing class to both ShimGeneration and StubGeneration in .fakes file.
In most cases like this one its tied to the version of .Net Framework installed on the box. As long as your test project targets the highest version of the Framework on your box, this should work out. Also when dealing with System* namespace please be sure to only generate fakes for types you need excluding others. That should help Fakes deal with API changes over versions and resolve any build errors you might be seeing because of this.
-Abhitej.
In the Solution Explorer in Visual Studio 2012, I right click on my wp8 project and go Properties, and the Application tab shows:
An error occurred trying to load the page.
Error HRESULT E_FAIL has been returned from a call to a COM component.
or
An error occurred trying to load the page.
The method or operation is not implemented.
Would anyone know how to go about debugging this?
I cannot repro this problem with a fresh project, but haven't been able to nail out where it is failing in my project...
Maybe related to AssemblyInfo.cs? Source file 'Properties\AssemblyInfo.cs' could not be found
BTW it builds and deploys to my device just fine...
Thanks
So after an exhaustive round of brute force elimination, I was able to narrow this down to my use of .java files. Yes it is weird, but it has worked. I have been including .java files in my project and setting their properties to Compile as c#. There were merge reasons for doing so, and I had of course modified the java code slightly to compile, but somehow Visual Studio's property pages spaz out when a .java file is included this way, even though the project compiles just fine. So I wrote a little tool to copy all the .java files to .java.cs and include them that way and everything is fine now!
I found this issue in all of my projects and reasoned it might have had to do with a recent Windows update. I updated VS 2017 to 15.9.15 and that resolved it for me.
I am facing unknown problem while using Prism 4. We implement business solution in MVVM pattern. For that I have used
1. Microsoft.Expression.Interactions
2. System.Windows.Interactivity
3. GalaSoft.MvvmLight.Extras.WPF4
for Interaction.Triggers, CallMethodAction and EventToCommand.
<SWI:Interaction.Triggers>
<SWI:EventTrigger SourceObject="{Binding ElementName=txtName}" EventName="GotFocus">
<MEI:CallMethodAction TargetObject="{Binding Path=DataContext,ElementName=txtName}" MethodName="txtName_GotFocus"></MEI:CallMethodAction>
</SWI:EventTrigger>
<SWI:EventTrigger SourceObject="{Binding ElementName=txtName}" EventName="KeyUp">
<GMEWCMD:EventToCommand Command="{Binding Path=DataContext.cmdtxtNameKeyUpEvent,ElementName=txtName}" PassEventArgsToCommand="True">
</GMEWCMD:EventToCommand>
</SWI:EventTrigger>
</SWI:Interaction.Triggers>
Everything is working fine but now we required to make whole system loosely couple we choose prism 4. We already achieved this but above code create following problem as below.
Could not load file or assembly 'Microsoft.Expression.Interactions, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
If I comment above code everything is working fine. I don't know what an issue. Does PRISM 4 not support above assemblies?
Please help us to get rid from this problem.
Thank you
This commonly happens to me when I reference both Microsoft.Expression.Interactions and System.Windows.Interactivity in a view that belongs to a module, but I fail to also add those references to the project that acts as the shell.
I had a similar problem with Prism in Visual Studio 2012. The XAML editor would fail with the same exception.
The solution was to install Microsoft Expression Blend SDK. The assembly should be part of SDK. Allegedly, it is necessary for binding between control events and commands in XAML and some code may require it.
I had the same problem during a Prism 6.1 composite app using .NET 4.5.2, where i was referencing in one of the modules (class library) the Microsoft.Expression.Interactions & System.Windows.Interactivity.
Eventually i had to reference the same dlls in the Desktop project (where bootstrapper and Shell belong)
Can't seem to add this web service in visual studio 2010 - what happens is :
C:\>wsdl [http://opensearch.addi.dk/1.0/opensearch.wsdl]
Error: Unable to import binding 'osSearchServiceSoapBinding' from namespace 'http://oss.dbc.dk/ns/opensearch_wsdl'.
- Unable to import operation 'search'.
- Group 'elementsAndRefinementsGroup' from targetNamespace='http://purl.org/dc/terms/' has invalid definition: Circular group reference.
I don't know much about this type of Web Services (use REST), but the guys that made this service use PHP and didn't see a problem or couldn't explain it to me.
I have look over the .xsd files but find them to verbose.
There is som PHP code in there but I do C# for the most part so I can't find heads or tails in them either.
Now the question is: How can I get this to work ? - if its not possible to fix so that I can import this in VS can someone show me how to do it manually in C#?
The wsdl from the opensearch is not very Visual Studio friendly. There is, as you mention, a circular reference in the schema. I am doing an .NET implementation of this for another library (AALBIB) - i downloaded all the .xsd files and manually edited the circular reference out, hoping that i will never use that part of the system. Then generated proxy classes using thewsdl tool
I've recently converted to Visual Studio 2010 and ran the conversion on a project that worked perfectly in VS2008. Things are not so sunny in Visual Studio 2010.
This is a .Net 2.0 WinForms project that makes a lot of use of binding ListViews and Grids to Generic Lists so taking out the Generic Lists isn't feasible.
I get the following error message (anonymised for posting purposes):
Could not find a type for a name. The type name was
'System.Collections.Generic.List`1[[MyAttribute, Domain, Version=1.0.0.5,
Culture=neutral, PublicKeyToken=71c8708be064889a]], mscorlib, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=b77a5c561934e089'. Line 134, position 5.
C:\Projects\MyProject\Control.resx
The problem goes away if I roll the project up to .net 4.0 but this project has to target .net 2.0 so that's not a suitable long-term solution.
Googling around finds plenty of posts from people /having/ the problem but none that I can see from people who have solved the problem so any help would be greatly appreciated.
Ta.
Delete the section in the .resx file and then also delete the line in the designer.cs (resources.GetObject("..."))that's loading that resource.
Then try opening the control in the designer and both should get regenerated, you might get a null reference exception depending on the control that's exposing a property that gets set in the designer. For me I was able to ignore and continue.
After the designer appears you can compare the resx file and see that whatever object it was is now serialized a little differently. Also if it's your custom control and you are exposing a generic list property consider putting the [Browsable(false)] attribute on it first so you cannot set the value from the designer and the designer will not automatically set it to a new value.
What was happening in my case was an empty generic list was serialized to the resx file and then after upgrading visual studio the list no longer serialized the same way.
Not much to info to go on here..
Looks like a serialization problem. Are you serializing a collection property on control? Does it need to be serialized?
If it's not needed try adding a DesignerSerializationVisibility attribute. It tries to serialize all properties by default.
We are finding this too... Our VS2008 projects that contain a property that exposes a generic list will get the same exception when building. We are using MSBuild 3.5 on a VS2010 build machine (it has 2010 installed, but we can't upgrade the projects to 2010 format yet).
Our error comes from a form:
TBDEV830.resx (143): Could not find a type for a name. The type name was 'System.Collections.ObjectModel.ObservableCollection`1[[T1.Tb.SideBar.ISideBar, T1.Tb.SideBar, Version=1.0.3702.18460, Culture=neutral, PublicKeyToken=null]], WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35'. Line 143, position 5.
Have found a few posts from other forums and no-one seems to have found a solution yet:
One article states to add [DesignerSerializationVisibility(DesignerSerializationVisibility.Content)] but this has no affect.
Another article (http://www.go4answers.com/Example/tfs2008-tfs2010-migration-upgrade-3526.aspx) states to load it in the IDE and asks if that helps isolate the problem, but that would mean upgrading the project to 2010 format, which ew can't do.