1 of 1 people found this helpful
Anytime a build fails, Visual Studio will list any code lines as being in error or warning. You would need to review and correct those specific errors. If you have difficulty understanding the error, you could post the specific error message here. While the big-picture problem is understood in your post, it lacks sufficient detail to provide concrete solutions.
2 of 2 people found this helpful
Hi Rick, thanks for the reply it did help. I searched fixed the issues as AF-SDK was .NETFramework, version=4.0 and my service was built against “.NETFramework,Version=v4.5.2” framework. This was throwing “Reference could not be resolved”.
The simplest workaround is to edit the modeling project file to ignore target framework version mismatches as follows:
- Unload the modeling project by right clicking on it in Solution Explorer window and choosing Unload Project.
- Open the project file into the editor by right clicking on it in Solution Explorer window and choosing Edit projectname.modelproj.
- Add the following element inside the <Project> element:
- Save the project file.
- Right click on the modeling project in Solution Explorer and choose Reload Project.
- Validate your architecture in the usual way.
That's good news, Prabhakar.
I have marked your own reply as the correct answer. Whenever PI AF is released, there should be Release Notes accompanying it, and it will let you know which .NET Framework to target in your applications. As you discovered, right now it is .NET 4.5.2. Future AF versions may require a minimum of .NET 4.6.2 or even 4.7.1. Again, check the Release Notes.
Now that you are past the Build stage, the next possible errors to arise may either be logic errors in your code, or null reference exceptions. We will be glad to help you with either of those, so come back when here you get stuck.
I am happy you found a solution for your problem but my first reaction on your workaround was confusion and confusion persists.
The framework version which a .NET library was built against usually marks the minimum target framework version. With other words, there shouldn't be any issue building against .NET Framework 4.5.2 with AF SDK 220.127.116.11 and I like to clarify this usually isn't an issue.
Until today, I never saw a projectname.modelproj in any of my Visual Studio projects.
I was also confused by what you identified as the most simple workaround. I am used to modify the .NET Framework target version within the properties of my .NET project.
I did some research with the information you shared and found your service might be a Unified Modeling Language (UML) project or you are using component diagrams in your project. Can you help me to understand why my Visual Studio projects are without projectname.modelproj?
I found this resource and after reading your post, it looks very familiar. The question for the Visual Studio version appears to be key. Can you share what Visual Studio version you are using?