I want to call Fraud Scoring for Merchants api.So i use nuget intall MasterCard-FraudScoring. My project's framework 4.5. vs2013 .When i using MasterCard,it's error is Failed to find the type or namespace name "MasterCard" (does it lack the using directive or assembly reference?)
I change framework from 2.0 to 4.5. and change the reference of file directory.It still not work. You can see the Object Browser exists the method. Plz,help me ,thanks.
No one answer me.So I find other way to do.I found https://github.com/Mastercard/mastercard-api-csharp,and if you can't compile, you can see issue,to resolve this problem.If you use this compile sdk,it works.I hope it can help you if the one meet this problem.
Related
I've installed a NuGet-package required to run som code to create QR-codes. The package conflicts with system.drawing.common
Error CS0433 The type 'PixelFormat' exists in both 'CoreCompat.System.Drawing, Version=1.0.0.0, Culture=neutral, PublicKeyToken=c0a7ed9c2333b592' and 'System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51'
I'm trying to solve it like this:
using PixelFormat = CoreCompat.System.Drawing;
Allthough it throws an error:
Error CS0246 The type or namespace name 'CoreCompat' could not be found (are you missing a using directive or an assembly reference?)
Obviously Visual studio knows it's there somehow thoug since otherwise there would not be a conflict.
I've tried reinstalling all related NuGet-packages.
How would i go about solving this?
CoreCompat is an old library built to provide a System.Drawing compatible API that would work in Core, as originally System.Drawing was not supported. Since that time, Microsoft has released System.Drawing.Common, which is its own Core-compatible System.Drawing replacement API. Somehow, you have references to both in your project.
If your QR code library is using CoreCompat, you should really file an issue with that project to ask them to update the dependency to System.Drawing.Common. Or, you can make the change yourself and submit a pull request. Otherwise, or until it's corrected, you may need to find a different library to use.
It's possible the dependency is coming from somewhere else, as well. Check your own projects to ensure you're not bringing that in. Ultimately, you're simply going to have to do a little research here and see where CoreCompat is coming from and get rid of that.
I'm attempting to use the following command line command to compile an assembly of the code from my project:
C:/"Program Files"/Unity/Editor/Data/Mono/bin/gmcs
-target:library -out:C:/Users/Austin/Desktop/PixelExpanse.dll
-recurse:C:/Users/Austin/Desktop/Projects/Repos/trunk/PixelExpanse/SpaceColonyRefactor/Assets/Source/*.cs
-d:RUNTIME -r:C:/"Program Files"/Unity/Editor/Data/Managed/UnityEngine.dll
As you can see, I am, I believe, correctly referencing the UnityEngine.dll.
The code that would be compiled contains references to UnityEngine.UI and UnityEngine.EventSystems. But when I run the above command, I get the following compile error:
error CS0234: The type or namespace name 'EventSystems' does not exist in the namespace 'UnityEngine'. Are you missing an assembly reference?
From what I have been able to find through googling, it SEEMS like an error people were getting when using a pre-4.6 assembly, because thats when EventSystems and UI were both introduced. But I don't know how I could be missing that in the dll I'm referencing as Unity 5 is the only version that has ever touched this computer.
As a side note, I have posted this question to Unity Answers and have yet to receive a response. I expect it's because assembly compilation is beyond the scope of what most users there choose to undertake. Hence my asking it here.
The namespace UnityEngine.EventSystems actually appears in UnityEngine.UI.dll and not UnityEngine.dll so it seems you need to reference the former too when compiling manually from the command-line. Unity projects have this by default (see below).
This is verified by opening up the assembly in your reflector tool of choice, here I am using JetBrains dotPeek:
This is how my test project appears with default Unity references. Note that by default a reference to UnityEngine.UI already appears in the Unity-created project:
When I built my Windnows desktop app via Unity, the above dlls appeared in:
<drive>:<projectOutFolder>\<projectName>_Data\Managed
You can try:
right click on "project panel", and after "Reimport All".
It's can be happen due to switch between platforms, e.g. IOS, or Desktop.. thus, folrders are deleted by became unecessary..
Solve for me: Unity 5.2, Win 7, 32bits;
Good luck!
I checked the UnityEngine.dll and the Eventsystems/UI namespace is not included. Despite, there is a dll in Unity5\Editor\Data\UnityExtensions\Unity\GUISystem\UnityEngine.UI.dll which includes these namespaces.
For mac, it's /Applications/Unity/Unity.app/Contents/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll.
I have taken over a project that is targeting .net4.
One of the projects within the solution is using System.Runtime.CompilerServices.CallerMemberNameAttribute from the System.Runtime.dll that is installed when you are using the Microsoft BCL Portability Pack.
I have checked and the project is currently using version 1.1.3.
When the solution is build on local dev machines, everything compliles with no problems.
I am now trying to get the solution built in teamcity, but when TeamCity attempts to compile the solution I am getting this error.
error CS0246: The type or namespace name 'CallerMemberName' could not be found (are you missing a using directive or an assembly reference?)
error CS0433: The type 'System.Runtime.CompilerServices.CallerMemberNameAttribute' exists in both 'c:\Windows\Microsoft.NET\Framework\v4.0.30319\mscorlib.dll' and 'c:\apps\teamcity\buildAgent\work\bb8aacaa9fabeac8\packages\Microsoft.Bcl.1.1.3\lib\net40\System.Runtime.dll'
I have read Jon Skeets answer to this question: Using CallerMemberName attribute in a portable library But I am already using the BCL library.
After spending some time on this, I found another question answered by Jon Skeet that resolved this issue.
When must we use extern alias keyword in C#?
Within my project, after getting the links to the Package, for each dll I had to change the name of the alias. ie from global to newglobal
Then in the classes that where using the CallerMemberName, had to do the following
At the top of the page, above the using statements
extern alias newglobal;
And then when referencing CallerMemberName, enter the code as
[newglobal::System.Runtime.CompilerServices.CallerMemberName]
This allows the code to be successfully built on teamcity where .net 4.5 has been installed.
I am new to StreamInSight development. I have downloaded few samples and now I am trying to compile them. I am getting error as "The type or namespace name 'IQStreamable' could not be found (are you missing a using directive or an assembly reference?)" I have already included below references into my project -
Microsoft.ComplexEventProcessing
System
System.Reactive.Core
System.Reactive.Interfaces
System.Reactive.Linq
System.Reactive.PlatformServices
System.Reactive.Providers
Please let me know if I am missing anything.
You need to make sure that the version of StreamInsight you downloaded and installed is v2.1. The IQStreamable interface is new in v2.1. Once you have confirmed that you have the correct version of StreamInsight or installed the correct version, you'll need to make sure you have the appropriate namespace and assembly included with your project. IQStreamable is in the Microsoft.ComplexEventProcessing.Linq namespace and the Microsoft.ComplexEventProcessing.dll. It also would not hurt to make sure that you are running the most recent version of Rx.
I needed to make a console application using nettiers class libraries. I created a new Console Application project, added references to all the libraries from NetTiers and created an app.config file with all the necessary configurations. I get intellisense and no errors and everything when I am doing the coding, but when I go to compile the application, I'm getting an error that PPGEDI.Data doesn't exist.
I only have 1 line in the program.cs Main method:
PPGEDI.Entities.VansEntity van
= DataRepository.VansEntityProvider.GetById(16);
I'm getting the following error:
Error 93
The type or namespace name 'Data'
does not exist in the namespace 'PPGEDI'
(are you missing an assembly reference?)
It's frustrating, because I know I've added the assembly reference:
I'm using Visual Studio 2010, with C# and .NET 4.0. Can anyone give me an idea as to what I need to do to get this to work.
As a note, this works if I use the same statement in a method on an ASPX page in the web application generated by nettiers.
#BrokenGlass, you were absolutely correct. I double checked and it was
set to ".NET Framework Client Profile", I changed it to .NET 4 and
it's working now, can you put that as an answer?
You are using the .NET client profile in your console app which is a "minified" version that doesn’t contain all assemblies.
The problem is that when your app adds a reference to a class library that is targeting the full framework, references to the "full" framework assembly will not resolve. This results in the rather non-forthcoming error message that you see. Switching to the the full .NET 4 as target framework will resolve the issue.
For a more in depth overview of the problem and the .NET 4 Client Profile in general also see "What’s new in .NET Framework 4 Client Profile RTM"