Microsoft Dynamics compling Symmetry error - axapta

I have a problem with the compiler, it does not recognize symmetry classes:
for example if I open the class PayrollCalculatePayStatementBenefits and I type an empty space and save the compiler shows a syntax error on the line 12 (Class declaration).
Symmetry.taxEngine.BenefitInfo benefitInfo401_403;
But before doing this action the hole process of paystatements generation was working fine
after saving the same code it does pay statement generation process dons not work any more showing and error
"absence of an executable code in path of the class"
I think it's a server configuration problem because if create a job and type Symmetry the the compiler does not propose the Symmetry class in the suggestion list, but I used to work on an other server in an other machine and it does , I don't understand ...

I just got this problem on AX 2012 R3 CU8. 22 compile errors on a brand new and clean installation...
It can be solved by adding a reference to ste-net.dll in the AOT.
This DLL file can be found in the client bin folder.
I found the solution
here

Related

RedundantNameQualifier error when Running Resharper CLI inspect tool

I'm using Resharper inspect CLI tool for static code analysis(JetBrains.ReSharper.CommandLineTools.2018.3.1\InspectCode.exe) on a dotnet core 2.1 console application I've created. Within the solution, there is a separate project which is just a package used in the console app.
Layout is as follows:
When I run the inspectCode.exe as follows:
JetBrains.ReSharper.CommandLineTools.2018.3.1\InspectCode.exe "AI.DL.Backup\AI.DL.Backup.csproj" /o:"CodeInspection_20222.xml" /profile:"AI.DL.Backup.sln.DotSettings"
I get the following issue:
Output xml report has the following:
<IssueType WikiUrl="https://www.jetbrains.com/resharperplatform/help?Keyword=RedundantNameQualifier" Severity="WARNING" Description="Redundant name qualifier" CategoryId="CodeRedundancy" Category="Redundancies in Code" Id="RedundantNameQualifier"/>
<Issue Message="Qualifier is redundant" Line="5" Offset="146-154" File="AI.DL.Backup\src\AI.DL.Backup\Startup.cs" TypeId="RedundantNameQualifier"/>
The problem seems to be that it cannot find the dll project referenced and is throwing code analysis error (code HAS been built already, so bin/obj folders exist with relevant dlls/packages required).
Ling 5 (as specified) is just the using statement for the separate package, which it cannot resolve and is deeming to be redundant.
using AI.DL.DocumentManagement;
using AI.DL.DocumentManagement.Stores;
Going by the generated XML report, I can see that it can't find the namespace within the separate package. Why would this be? Anyone seen this before?
I was able to work around this issue when I repointed the "inspect.exe" to my solution file instead of individual project!

JEdit plugin error while loading Isabelle

I am working with a Windows 10 device and after some work with Isabelle I get the following error:
The following plugin could not be loaded:
C:\Users\PC\Desktop\Isabelle2018\src\Tools\jEdit\dist\jars\Isabelle-jEdit.jar:
Cannot start:
*** [line 1 of "preferences"] error: bad input
I note this problem appears in this version and in a previous Windows 8 version when not switching off properly the machine.
In the Isabelle list I got an answer to this problem:
The error indicates that the $ISABELLE_HOME_USER/etc/preferences file is in a bad state: the file is written each time Isabelle/jEdit shuts down, and switching off the computer in the middle might have corrupted it.
You can try to repair or delete that file. The location of $ISABELLE_HOME_USER on Windows is usually something like C:\Users\my_name.isabelle\Isabelle2018.
I think this problem may be encountered by other people in the community and this answer may save some time to them.

How can I resurrect my Windows Store app after several packages fail to load?

The last time I had my Windows Store app open (last night), I had a XAML error in it. I (tried to) open it tonight to try to fix it, but got all kinds of errors about things not being able to be loaded. Here are the important excerpts from the ActivityLog.xml file:
460
2014/12/25 01:39:17.198
Error
VisualStudio
SetSite failed for package [LocalHistoryPackage]
{3A6E8827-8C64-42EC-B83A-9CA32DA7BBF5}
80131500
No exports were found that match the constraint:
ContractName Microsoft.VisualStudio.Text.ITextDocumentFactoryService
RequiredTypeIdentity Microsoft.VisualStudio.Text.ITextDocumentFactoryService
. . .
935
2014/12/25 01:43:39.091
Error
VisualStudio
SetSite failed for package [LocalHistoryPackage]
{3A6E8827-8C64-42EC-B83A-9CA32DA7BBF5}
80131500
No exports were found that match the constraint:
ContractName
Microsoft.VisualStudio.Text.ITextDocumentFactoryService
RequiredTypeIdentity
Microsoft.VisualStudio.Text.ITextDocumentFactoryService
. . .
937
2014/12/25 01:43:39.092
Warning
VisualStudio
Package failed to load; error message suppressed by skip flag
{3A6E8827-8C64-42EC-B83A-9CA32DA7BBF5}
. . .
966
2014/12/25 01:43:52.147
Error
VisualStudio
SetSite failed for package [Microsoft.VisualStudio.Editor.Implementation.EditorPackage]
{E269B994-EF71-4CE0-8BCD-581C217372E8}
80131500
No exports were found that match the constraint:
ContractName
Microsoft.VisualStudio.Utilities.IContentTypeRegistryService
RequiredTypeIdentity
Microsoft.VisualStudio.Utilities.IContentTypeRegistryService
I shut VS down, reopened it and the project and, although I didn't see all those err msgs, and the project was ostensibly open, there was nothing in the Solution Explorer (no files displayed). I tried opening MainPage via File > Open, but that just resulted in another err msg.
The only other thing that changed the last time I had the project open was that I updated SQLite from version 3.8.7.1 to 3.8.7.2
What could be the solution (no pun intended)?
UPDATE
On trying to shut down Visual Studio, I got over and over again: "No exports were found that match the constraint...(bla bla bla)" until I had to stop it via Ctrl+Alt+Del
UPDATE 2
Here's what's even more bizarre: I can open the project and, although Solution Explorer is completely empty/no files
visible, if I build the project via Ctrl+Shift+B, it does give me the errors in the Error List (XAML errors in MainPage.xaml).
2-clicking them brings up nothing in the editor, though.
If I try to open MainPage.xaml, I get this:
But, although I just saved this file (the screen shot above), the date on it is 10/19/2014 - more than two months in the past. What the...?!?
What must I do to get this back to normal?
UPDATE 3
I do see this with the Team Explorer tab open (this app is not under version control):
Page '3185ed96-1cbd-4381-a439-636973542e50' not found.
I fixed the XAML issue by opening MainPage.xaml in Notepad ++ and changing the XAML around. I was then able to successfully build the app in Visual Studio, but trying to run the app caused VS to crash and then start up again (still with no files in Solution Explorer).
UPDATE 4
Now I get, "Package Designer Package failed to load" when I try to open MainPage.xaml via File > Open in VS 2013...
UPDATE 5
Now I can run the app (sort of); F5 causes the splash screen to display, and then it just goes gray-black. When I Alt+F4 to shut that down, VS starts back up again (apparently after shutting down - I intended to only shut down my running app, not Visual Studio.
AutoHistory tells me:
An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\Clay\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml".
Exception details:
System.Exception: Exception of type 'System.Exception' was thrown.
at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid&
context)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
Anyway, I then notice that I do have a (literal) red flag, and mashing it shows me an "Renew your developer license" message.
I was able to update my dev license, but my solution is still wacky in the same ways as before.
UPDATE 6
Answering Walt Ritscher, I get this in AutoHistory on starting VS (no solution opened):
An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\Clay\AppData\Roaming\Microsoft\VisualStudio\12.0\ActivityLog.xml".
Exception details:
System.Exception: Exception of type 'System.Exception' was thrown.
at Microsoft.VisualStudio.Shell.Interop.IVsShell5.LoadPackageWithContext(Guid& packageGuid, Int32 reason, Guid& context)
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.GetPackage()
at Microsoft.VisualStudio.Platform.WindowManagement.WindowFrame.ConstructContent()
Then, when opening another project that was working fine the last time I had it open, it, too, shows no files in the Solution Explorer. If I try to run it, I get that same "No exports were found" err msg.
So VS itself is hosed, it seems. What need I do? Uninstall/reinstall?
It seems likely that your VS install is hosed. You can try a repair first, before doing a reinstall.
last week I have faced the similar problem with my Visual Studio . I think these problems occurs due to the Pc Cleaners/Pc problem fixer and others like that. I just reinstalled the windows and visual studio and the same code executed fine.
So VS itself is hosed, it seems. What need I do? Uninstall/reinstall?
I would definitely try that. However, first I would copy the project to another machine with VS installed and try there. If it works on another machine then there is a problem on the first machine, possibly VS, possibly some extension or add-in. If it doesn't work on another machine then there is a problem with the code.

Mono random CS0006 compilation errors w/ fastcgi-mono-server4

I'm trying to deploy an ASP MVC project developed on Mono/OSX on my Linux server using mono 2.10.8.1 w/ fastcgi-mono-server4
The webapp always starts fine, but then I start getting random CS0006 compilation errors for various URIs, and once they break, they remain broken until I restart the server application.
An example error:
Server Error in '/' Application
Compilation Error
Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.
Compiler Error Message: CS0006: Metadata file `/tmp/root-temp-aspnet-0/ed68754/App_global.asax_40e709ea.dll' could not be found
~/Views/Order/Download.aspx
There is a related thread from January, but both the question and the answer seem to be mod_mono specific and rather hand-wavy. Anyone have any advice on what to try to debug/solve/work around this issue? It's getting very frustrating. In particular, is there any "unsupported" workaround where I can copy something from my Windows Server machines to use an MS implementation instead of the buggy mono one?
(I've filed a bug report too.)
Since the errors appear to be issue with the Mono JIT attempting to compile temporary files that don't exist, I spent a few days trying different methods of working around this issue (vs solving it). One solution that worked was using aspnet_compiler on Windows to create a binary version that could be copied and run as-is on Linux/Mono (as the latest versions of Mono now support precompiled ASP.NET applications).
However, I was looking for a native Linux solution, and I don't want to have to compile and sync binaries (vs syncing a GIT repo of code) to the server, so I was looking for another solution when I came across Mono ahead of time compilation, which is pretty much the equivalent of ngen.exe on Windows.
While it doesn't precompile everything, it seems to have done the trick. For me, this deployment script does the job without any runtime build failures:
xbuild SystemDiscs.sln
mono --aot -O=all SystemDiscs/bin/SystemDiscs*.dll
killall -9 mono
nohup fastcgi-mono-server4 /socket=tcp:127.0.0.1:8000 /applications=/:/var/asp/S
ystemDiscs/SystemDiscs/ > /var/log/systemdiscs.log &
Where SystemDiscs*.dll is the output of the solution compiled with xbuild in the first step. I don't think this precompiles the ASP pages (and --aot=full isn't supported on x86, as far as I can tell), but somehow it did the job. I was waiting to see whether or not that was just a fluke, but it's been going fine with maybe a dozen commits/deploys since I asked this ten days ago, so I reckon its safe to say it works.
I had a similiar problem:
Compilation Error
Description: Error compiling a resource required to service this request. Review your source file and modify it to fix this error.
Compiler Error Message: CS0006: Metadata file `/tmp/<DOMAIN/>/<username/>-temp-aspnet-0/5ed74d00/App_global.asax_34cccb99.dll' could not be found
/Default.aspx
But it didn't have anything to do with precompiling but with a backslash in my username. I use likewise-open to login to a windows domain, so my username is <DOMAIN/>\<username/> while my home-directory is without a backslash: /home/likewise-open/<DOMAIN/>/<username/>. This difference or just the backslash itself caused mono not finding the compiled global.asax in the temp directory. If you look closely to the detailed output you see that the backslash \ in the out parameter is changed to a forward slash /:
dmcs /target:library /lib:"/home/likewise-open/<DOMAIN/>/<username/>/Documents/test9999/test9999/bin" /debug+ /optimize- /warn:4 /out:"/tmp/<DOMAIN/>\<username/>-temp-aspnet-0/5ed74d00/App_Web_17ca7bdd.dll" /r:"/usr/lib/mono/4.0/mscorlib.dll" /r:"/usr/lib/mono/gac/Microsoft.CSharp/4.0.0.0__b03f5f7f11d50a3a/Microsoft.CSharp.dll" /r:"/usr/lib/mono/gac/System/4.0.0.0__b77a5c561934e089/System.dll" /r:"/usr/lib/mono/gac/System.Configuration/4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll" /r:"/usr/lib/mono/gac/System.Web/4.0.0.0__b03f5f7f11d50a3a/System.Web.dll" /r:"/usr/lib/mono/gac/System.Data/4.0.0.0__b77a5c561934e089/System.Data.dll" /r:"/usr/lib/mono/gac/System.Web.Services/4.0.0.0__b03f5f7f11d50a3a/System.Web.Services.dll" /r:"/usr/lib/mono/gac/System.Xml/4.0.0.0__b77a5c561934e089/System.Xml.dll" /r:"/usr/lib/mono/gac/System.Drawing/4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll" /r:"/usr/lib/mono/gac/System.EnterpriseServices/4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll" /r:"/usr/lib/mono/gac/System.IdentityModel/4.0.0.0__b77a5c561934e089/System.IdentityModel.dll" /r:"/usr/lib/mono/gac/System.Runtime.Serialization/4.0.0.0__b77a5c561934e089/System.Runtime.Serialization.dll" /r:"/usr/lib/mono/gac/System.Xaml/4.0.0.0__b77a5c561934e089/System.Xaml.dll" /r:"/usr/lib/mono/gac/System.ServiceModel/4.0.0.0__b77a5c561934e089/System.ServiceModel.dll" /r:"/usr/lib/mono/gac/System.ServiceModel.Web/4.0.0.0__31bf3856ad364e35/System.ServiceModel.Web.dll" /r:"/usr/lib/mono/gac/System.Core/4.0.0.0__b77a5c561934e089/System.Core.dll" /r:"/usr/lib/mono/gac/System.Web.Extensions/4.0.0.0__31bf3856ad364e35/System.Web.Extensions.dll" /r:"/usr/lib/mono/gac/System.Data.DataSetExtensions/4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll" /r:"/usr/lib/mono/gac/System.Xml.Linq/4.0.0.0__b77a5c561934e089/System.Xml.Linq.dll" /r:"/usr/lib/mono/gac/System.ComponentModel.DataAnnotations/4.0.0.0__31bf3856ad364e35/System.ComponentModel.DataAnnotations.dll" /r:"/usr/lib/mono/gac/System.Web.DynamicData/4.0.0.0__31bf3856ad364e35/System.Web.DynamicData.dll" /r:"/usr/lib/mono/gac/System.Data.Linq/4.0.0.0__b77a5c561934e089/System.Data.Linq.dll" /r:"/usr/lib/mono/gac/System.Web.ApplicationServices/4.0.0.0__31bf3856ad364e35/System.Web.ApplicationServices.dll" /r:"/home/likewise-open/<DOMAIN/>/<username/>/Documents/test9999/test9999/bin/test9999.dll" /r:"/tmp/<domain/>/<username/>-temp-aspnet-0/5ed74d00/App_global.asax_34cccb99.dll" /nowarn:0169 /d:DEBUG -- "/tmp/<DOMAIN/>\<username/>-temp-aspnet-0/5ed74d00/App_Web_17ca7bdd_0.cs"
So:
/out:"/tmp/<DOMAIN/>\<username/>-temp-aspnet-0/5ed74d00/App_Web_17ca7bdd.dll
becomes
/tmp/<DOMAIN/>/<username/>-temp-aspnet-0/5ed74d00/App_global.asax_34cccb99.dll
If I copy the directory 5ed74d00 to /tmp/<DOMAIN/>/<username/>-temp-aspnet-0/ the application works as expected.
It took me almost 2 days to see this, so hopefully I can help others with this answer.

BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'

When I compiled my latest asp.net program and trying to run on the test server, I am getting this error
Line 46: Dim dependencies() As String
Line 47: CType(Me,Global.System.Web.UI.Page).AppRelativeVirtualPath = "~/default.aspx"
Line 48: If (Global.ASP.default_aspx.__initialized = false) Then
Line 49: dependencies = New String(0) {}
Line 50: dependencies(0) = "~/default.aspx"
Source File: C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb Line: 48
Detailed errors when I expand the compiler output...
Microsoft (R) Visual Basic Compiler version 8.0.50727.3053
for Microsoft (R) .NET Framework version 2.0.50727.3053
Copyright (c) Microsoft Corporation. All rights reserved.
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb(48) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.
If (Global.ASP.default_aspx.__initialized = false) Then
~~~~~~~~~~~~~~~~~~~~~~~
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb(51) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.
Global.ASP.default_aspx.__fileDependencies = Me.GetWrappedFileDependencies(dependencies)
~~~~~~~~~~~~~~~~~~~~~~~
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb(52) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.
Global.ASP.default_aspx.__initialized = true
~~~~~~~~~~~~~~~~~~~~~~~
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb(76) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.
Private Sub __BuildControlTree(ByVal __ctrl As default_aspx)
~~~~~~~~~~~~
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.0.vb(100) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.
Me.AddWrappedFileDependencies(Global.ASP.default_aspx.__fileDependencies)
~~~~~~~~~~~~~~~~~~~~~~~
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\ocbuild\c0c442ff\f0292c99\App_Web_default.aspx.cdcab7d2.4ubu1wgu.1.vb(31) : error BC30560: 'default_aspx' is ambiguous in the namespace 'ASP'.
Return New ASP.default_aspx
~~~~~~~~~~~~~~~~
I checked a few things and all of them turned out to be okay:
[*] Default is not defined twice
anywhere
[*] Everything was working
on the last release 1 week back
[*] There are no old files that are
still staying with the compiled
files. Also I cleared the temporary
files many times.
[*] I have tried
with other aspx files and all of
them is giving ambiguous error
(error in different source files...)
[*] The original source works just
fine! only the error shows up on the
compiled code.
Any ideas or any clues on how to resolve this ambiguity.
Thanks
SK
I just solved this problem with the assistance following link: http://www.netomatix.com/development/usercontrols2.aspx
Add this on aspx or ascx page ClassName="MyModule"
<%# Control Language="vb" AutoEventWireup="false" CodeBehind="MyModule.ascx.vb" ClassName="MyModule" %>
Okay here is what I found after spending three days on this problem.
Finally I figured that if I removed all the projects from the solution except one (that was causing problem) I could isolated it to default.skin. The problem seemed to be very erratic because it started going away if I deleted certain lines from this file. However, this was not consistent and the problem came and went at random.
So after losing all hopes of fixing it in the code, I decided to try it another way. I changed the option of aspnet_compiler command from -prefix switch (a dll is created for each folder) to -o (all compiled ui is put in one dll), the problem went away!!!
It seems that the problem is due to some bug in the aspnet_compiler. It got triggered in this version somehow that I could not figure out.
I am thinking of moving to more stable asp.net 3.5SP1 (or maybe wait for asp.net 4.0) any suggestions?
I ran into this issue in consuming project when changing name/namespace of a library that consuming project referenced.
Issue is consuming project Bin folder has copy of DLL with each name/namespace name.
Deleting the consuming project Bin folder and rebuilding solved.
I've found that mixing Namespaces can really confuse things.
The best way to clean it up is to remove all the namespace declarations in your web project, and make sure that they're consistent in dependent projects. Don't forget to check the project properties, and the generated .designer.vb files.
Also, it sounds like you have a top-level directory named ASP - that's probably not helping things either. I'd get rid of that directory entirely, and see if that helps the problem. I did report this as a bug to MS a while back, and even provided them with a reproducible example, but never heard anything back from them.
I solved this problem by putting the namespace above the class
Namespace yournamespace
Public Class yourclass name
end class
end Namespace
You need to make sure that the user control is also copied across with the page to your test server.
We had the same problem on out test servers. We found a duplicate of our application dll in the bin file. It's name was slightly different (missing a single "." in it) than the original dll but it contained the same types. We removed it and everything started working again.
After I checked the same items as Samuel:
[*] Default is not defined twice anywhere
[*] Everything was working on other computer 1 week back
[*] There are no old files that are still staying with the compiled files. Also I cleared the temporary files many times.
[*] I have tried with other aspx files and all of them is giving ambiguous error (error in different source files...)
[*] The original source works just fine! only the error shows up on the compiled code.
(...)
I just let my code as originaly in VS-2015 and in CMD window I executed:
C:\Windows\Microsoft.NET\Framework\v4.0.30319>aspnet_compiler -v / -p "C:\inetpub\wwwroot\projectFolder"
And every thing was running Ok without any error.
Subsequents compilations in VS-2015 environment were also Ok.

Resources