I created a project references in one c# 4.0 project to another c# 4.0 project in the same solution.
They are both EXE projects
when I add the reference intelesense starts picking up all of the classes in the referenced project.
However when I go to compile I get the following error "The type or namespace name '...' could not be found (are you missing a using directive or an assembly reference?)". And then all of the Class names lose their blue color and get underlined in red.
Right click on Project Properties
Check Target Framework
If it is .net Framework 4.0 Client Profile than change it to .net Framework 4.0
Related
I'm working on a project that targeting .NET 4.0 Framework. I added a reference to a third party dll file and call its methods in my code and have no error. But when I build the project it gave me The type or namespace error with blue underline on the methods of the dll. Using .NET Reflector I checked dll .NET Version of mscorlib.dll it is 4.0.0.0. My application Target .NET Version is 4.0 then Why I'm getting this error.
What I have done.
Remove all references to the library. Clean the project. Restart the project. again add the references. Not good in English please guide me. Stuck in it last 4 days.
Check if you have privileges to access the dll file. Then try running Visual Studio as administrator. If it does not help try to build the solution as 64x/86x not Any CPU.
I have an asp.net core 3.1 solution, with web application project and another 2 class library projects.
files architecture
I am trying to add reference from one class library project to the other using Ctrl+".", but it doesn't give an option to do that in the IntelliSense.
How can I do the reference without IntelliSense ? (Adding it manually using CoronaPatients.Core also not working).
How to enable it from the IntelliSense ?
Well I have just discovered the right click on the project ->> Add ->> Project Reference... option, and check the project you want to reference to.
But still, why is it not in the IntelliSense ?
I cannot successfully compile an extension library that is freshly created using the Customization Project -> Extension Library -> Create New.
When compiling the freshly created extension library, I get the following error in the output, but no errors show in the error report:
1>C:\Program Files (x86)\Acumatica ERP\SilcotekDev\App_Data\Projects\ManufacturingTest\ManufacturingTest\Test.cs(6,7,6,9): error CS0246: The type or namespace name 'PX' could not be found (are you missing a using directive or an assembly reference?)
I have another custom extension library which had compiled successfully in the past, but today is not. Here is the full error list from that project's compilation:
I do have a custom DAC which I imported directly into the extension library, and I had compiled it before with that DAC added. Today it won't compile at all.
With update 3 of version 6.1 Acumatica has changed the target framework for its websites from 4.5.1 to 4.5.2. Unfortunately, the target version of the Addon.csproj VS project from the \App_Data\WebsiteSolution\Addon folder was not updated to .Net Framework 4.5.2 until update 9 of ver. 6.1 (build #6.10.0945). Because of the lower target version set for extension library VS project, VS cannot build the dll and therefore copy it to the Bin folder of your website.
There are 2 ways to resolve this type of an issue:
Change target framework version in VS for your extension library project:
Open the Addon.csproj VS project in a text editor, like NotePad, and change the target framework to v4.5.2 as shown in the screenshot below (located in the \App_Data\WebsiteSolution\Addon folder inside your Acumatica website root folder). Create a new customization project inside Acumatica, then in Customization Manager create extension library for the new project
There are a lot of things that could cause this problem.
1. is your program set up to read the PX namespace?
2. are you References setup the right way. You can always check by right clicking on the reference and selecting "Add reference"
In my C# solution, there is a web service project in which adding project reference of a class library project does not work, it throws compilation error saying -
The type or namespace name 'xyz' does not exist in the namespace
'abc.pqr' (are you missing an assembly reference?)
abc.pqr.xyz is from the class library being referenced.
while adding dll reference does not throw any compilation error.
I even checked the framework, it is .net framework 4 in both.
One thing more, the project which needs to have a reference was a web service project (Framework 3.5, converted to 4.0).
I added another web service (then converted to 4.0), then added project reference added the same code, compilation goes well.
Issue is with only one project in the solution.
Please help me to figure out the fix.
I am moving a VB.net class from a project using .net 2.0 to a project using .net 4.5
In the class is a Imports System.Web.UI.Design, however, in the 4.5 project this statement shows up with a green squiggly line under it and the mouseover text says: "Namespace or type specified in the Imports 'System.Web.UI.Design' doesn't contain any public members or cannot be found."
I have added the System.Design.dll as a reference to the project and in the Object Browser, I can see the System.Web.UI.Design namespace. I have verified that the system.design.dll exists in Windows/Microsoft.Net/Framework/v4.0.30319 and Program Files (x86)/Reference Assemblies/Microsoft/Framework/.NETFramework/v4.5 directories.
I am using Visual Studio 2012.
In Windows/Assembly, I only see the 2.0.0.0 version of the assembly, however, Add Reference in VS shows the version I added as 4.0.0.0. Tried dropping the dll from the v4.0.30319 directory into windows/assembly and using the gacutil. While gacutil said the assembly was added, it still didn't appear in Windows/Assembly.