Why is my changes ignored to releaseupdate scripts in dynamics ax 2012 r2 - x++

I have a problem with the ReleaseUpdateDB60_Basic.updateAdjustment_RU script -> UPDATE RASSETADJUSTMENTTABLE SET = LTRIM(), is a syntax error. If i comment the line that generates this sql out, sync, recompile, then the error still persist when I run the script.
We are upgrading from AX 2009 to AX 2012 R2.

Remember to do the incremental CIL update. Upgrade scripts are run in batch, which uses the CIL.

Related

F# - FSI- Load source file "Process is terminated due to StackOverflowException"

I have updated Visual Studio Community 2019 to Version 16.11.4 and when I try to load a source file (i.e.: Library1.fs) into the FSI environment (trough Alt+Enter or writing the #load command inside the FSI environment inside VISUAL STUDIO), I get the Stack Overflow Exception error:
Microsoft (R) F# Interactive versione 11.4.2.0 per F# 5.0
Copyright (C) Microsoft Corporation. Tutti i diritti sono riservati.
Per informazioni, digitare #help;;
#load "C:\Users\GianLuca\Source\Repos\x\x\Library1.fs";;
Process is terminated due to StackOverflowException.
Session termination detected.
This happen everytime I try to “Load” any source file, event an empty source file!!
NOTE: I’m using F-Sharp Library (.NET Framework 4.72), but the same occurs with CLASS LIBRARY (.NTE STANDARd or .NET CORE)
NOTE: if I lunch “dotnet fsi” from the command prompt (cmd) - outside form Visual Studio - and I try to “Load” the same files, it works fine (no Stack Overflow Exception!).
NOTE: I have launched the REPAIR action from the VISUAL STUDIO INSTALLER, but the problem persists.
How I can resolve it? I’m confused.
It seems a problem of F# INTERACTIVE inside Visual Studio Community 2019 Version 16.11.4
Many thanks in advance!
(See also: https://developercommunity.visualstudio.com/t/F---FSI--Load-source-file-Process-is-t/1550593)

Nuget gives the error "ps1 cannot be loaded because running scripts is disabled"

I have a new empty MVC 5 project, and I try to install Nuget packages.
When I insert in the Nuget Console the command :Update-Package I got the following asnwer:
File E:\WebApp\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.1.0.0\tools\uninstall.ps1 cannot be loaded because running scripts is
disabled on this system. For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.At line:1 char:3
+ & 'E:\WebApp\packages\Microsoft.CodeDom.Providers.Dot ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
then I start to install some new packages and got again this message:
WebApp\packages\Modernizr.2.8.3\tools\install.ps1 cannot be loaded because running scripts is disabled on this system
I saw some posts related with this message, but not related with MVC projects.
My question is:
Why I get those messages?
What can I do to fix this issue?
This issue, can appear on the server where my application will run? Some scripts to not run as expected?
I guess the specific package you are trying to install needs to run a Powershell script and for some reason, Powershell execution is disabled on your machine.
You can search google on "how to enable Powershell" for a complete guide but generally, it goes like this:
Open up a Powershell command window (just search for Powershell after pressing windows start button)
Check out current restrictions by typing Get-ExecutionPolicy
Enable PowerShell by typing Set-ExecutionPolicy remotesigned
This issue does not affect the server you are planing to install your application on.
If you encounter this installing NuGet packages from Visual Studio Package Manager Console, run Visual Studio as Administrator.
In case anybody finds this on Google and this happened to you, I suggest you first try restarting Visual Studio, particularly if the Package Manager Console has worked for you before. In VS 2019, I've noticed that, if I leave it in the background while it's loading, sometimes it'll throw that error.
For me, restarting Visual Studio and leaving it in the foreground until the Package Manager Console finished initializing solved the issue. Note that running it as administrator was not necessary.
Translation of the image text would be somewhat: This certificate has been revoked from its key store.
Certificate on my init.ps1 has expired - thus RemoteSigned will not do. For that package version to work, it would need to be set to ByPass or Unrestricted. Personally, i would not recommend doing this...
-- EDIT --
I went ahead and updated the package and found they have resigned a new cert for v 1.0.2. Issue following in NuGet console for fix:
Update-Package Microsoft.CodeDom.Providers.DotNetCompilerPlatform
open your power-shell as administration and type
Get-ExecutionPolicy
Expected result RemoteSigned
Set-ExecutionPolicy remotesigned
if it does not work, try Powershell run in administrator
I ran into a similar issue building a project and found that you MAY have to set the execution policy to remoteSigned (as others have mentioned) in BOTH powershell (x86) and powershell (x64). I was running the x64 version as administrator and Get-ExecutionPolicy returned "remoteSigned" but the x86 version hadn't been updated. Just something to try if the above answers don't work for you.
This should work
open your power-shell as administration and type
Get-ExecutionPolicy
Expected result RemoteSigned
Set-ExecutionPolicy remotesigned
Enjoy
A quick to fix this error when using Package Manager Console without VS restart and/or running as Admin is to remove the restriction for current user:
Set-ExecutionPolicy remotesigned -scope CurrentUser

Run Migrations command if not have visual studio

I'm publishing a website ASP.NET MVC and get this error:
“Migrations is enabled for context ‘Context’ but the database does not exist or contains no mapped tables. Use Migrations to create the database and its tables, for example by running the ‘Update-Database’ command from the Package Manager Console.”
I can't install visual studio on server so i can't run ‘Update-Database’ command.
How to solve this problem ?
Find migrate.exe (YourApp\packages\EntityFramework.6.1.3\tools) and paste it in bin folder on the server.
Open Command Prompt on the server.
Run below commands
cd "C:\Websites\YourApp\bin" migrate.exe YourAppName.Api.dll /startupconfigurationfile:..\Web.config /verbose
Please Note that YourAppName.Api.dll should be the DLL having Enabled Migration.
you do not need to install visual studio on the server.
if you have your database connection string setup in web.config you should be able to run update-database in the package manager console and it will update your database on your web host.

migrate data from TFS 2008 to an already working TFS 2012

I read everything about the upgrade process from TFS 2008 to 2012.
but my situation is a bit diffrent. I need to move data from tfs 2008 (sqlserver 2003) to tfs 2012 (sqlserver 2008 R2) without damaging the TFS 2012 data.
what is the best practice?
Adding some issues:
I am trying to be as cautious as possible without damaging any of the data.
So I have:
1. old server TFS 2008 with sqlserver 2005 which is being used
2 demo server with TFS 2012 and sqlserver 2008 R2 with some collections and projects on it (this is a replica of a server we have and is being used as well).
The main purpose is to transfer all data to the 2012 server and kill the old machine.
what i did was to take a backup from the sqlserver 2005 and restore all the tfs* db's to the demo server .
TfsActivityLogging
TfsBuild
TfsIntegration
TfsVersionControl
TfsWarehouse
TfsWorkItemTracking
TfsWorkItemTrackingAttachments
Afterward I run "tfsconfig import" on the demo server.
TfsConfig Import /SQLInstance:SQLSERVERNAME /CollectionName:DemoImportCollection /confirmed
which fails:
Creating temporary structures... (169 of 502)
[Info #15:45:36.159] [2014-01-14 15:45:33Z][Error] TF400744: An error occurred while executing the following script: UpgradeTestResults_OrcasToDev10Beta1.sql. Failed batch starts on the line 613. Statement line: 23. Script line: 635. Error: 2627 Violation of PRIMARY KEY constraint 'PK__tmp_tbl___1786A43E234A136B'. Cannot insert duplicate key in object 'dbo.tmp_tbl_OrcasTestOutcomeLookUp'. The duplicate key value is (?«ƒ??????????????¢???????????ƒ). (169 of 502)
[Info #15:45:36.159] [2014-01-14 15:45:34Z][Informational] Microsoft.TeamFoundation.Framework.Server.CollectionServicingException: TF400744: An error occurred while executing the following script: UpgradeTestResults_OrcasToDev10Beta1.sql. Failed batch starts on the line 613. Statement line: 23. Script line: 635. Error: 2627 Violation of PRIMARY KEY constraint 'PK__tmp_tbl___1786A43E234A136B'. Cannot insert duplicate key in object 'dbo.tmp_tbl_OrcasTestOutcomeLookUp'. The duplicate key value is (?«ƒ??????????????¢???????????ƒ).
at Microsoft.TeamFoundation.Framework.Server.SqlScriptResourceComponent.ExecuteScripts(List`1 scripts, SqlParameter[] sqlParameters, List`1 serviceVersions, Boolean acquireLock)
at Microsoft.TeamFoundation.Server.Servicing.TFCollection.FrameworkStepPerformer.ExecuteSql(String stepData, ServicingContext servicingContext)
at Microsoft.TeamFoundation.Framework.Server.TeamFoundationStepPerformerBase.Microsoft.TeamFoundation.Framework.Server.IStepPerformer.PerformStep(String servicingOperation, String stepType, String stepData, ServicingContext servicingContext)
at Microsoft.TeamFoundation.Framework.Server.ServicingStepDriver.PerformServicingStep(ServicingStep step, ServicingContext servicingContext, ServicingStepGroup group, ServicingOperation servicingOperation) (169 of 502)
[Warning#15:45:36.596] TF255185: Encountered a warning during operation. Message=[2014-01-14 15:45:34Z] Servicing step Upgrade Test Results failed. (ServicingOperation: UpgradePreTfs2010Databases; Step group: Upgrade.TfsTestManagement).
[Info #15:45:36.627] [2014-01-14 15:45:34Z] Servicing step Upgrade Test Results failed. (ServicingOperation: UpgradePreTfs2010Databases; Step group: Upgrade.TfsTestManagement) (169 of 502)
[Info #15:45:36.627] [2014-01-14 15:45:34Z][Informational] Removing item. Key: TargetRequestContext. (169 of 502)
[Info #15:45:36.627] [2014-01-14 15:45:34Z][Informational] Clearing dictionary, removing all items. (169 of 502)
[Warning#15:45:36.659] TF255185: Encountered a warning during operation. Message=TF255271: The team project collection could not be created. The number of steps before the completion of project creation is: 502. The number of steps completed before the failure was 169..
[Warning#15:45:37.690] Warning Message: [2014-01-14 15:45:34Z] Servicing step Upgrade Test Results failed. (ServicingOperation: UpgradePreTfs2010Databases; Step group: Upgrade.TfsTestManagement)
[Warning#15:45:37.690]
[Warning#15:45:37.737] Warning Message: TF255271: The team project collection could not be created. The number of steps before the completion of project creation is: 502. The number of steps completed before the failure was 169.
[Warning#15:45:37.737]
I have a suspicion that this problem occur due to Hebrew characters in database which translate on the temp import tables as question marks ("?????")
Appreciate any help or direction solving this issue.
Regards
Erez
You can use TFS integration platform for that. It will migrate all the files and history. If you have TFS work items you can migrate those as well(if you use the same Project template on the 2012 server as well)
Two minor points you need to know:
1) After the migration, history will have the Datetime of when you migrate but you can see the actual Datetime in the comments.
2) It will also add an extra text to your comments saying you migrated using the integration platform.
http://tfsintegration.codeplex.com
After trying everything (without touching the real Data) I succeeded.
I decided to split the upgrade process to two 2008-2010 and 2010-2012.
I copied the 2008 TFS db's to the neNew SQLSERVER which is being
used by the TFS 2012
I added another VM with TFS 2010
I run from TFS 2010 the upgrade wizard which identify the 2008 copied db's
The result was a new collection attached to TFS 2010
I detached the collection On the TFS 2012
I run attach collection (the TFS 2010 one) and this upgraded the collection.
The process worked smothly.
Thanks all for the Help
Erez.h

Upgrading TFS 2005 to TFS 2010 - Migrating Sharepoint site

I recently did a migration upgrade from TFS2005 to TFS2010. Everything works, but the Sharepoint site wasn't migrated.
I attempted running the command below:
stsadm.exe -o addcontentdb -url http://NEWSERVER/sites -databasename STS_Content_TFS -databaseserver NEWDB
but I got the following error:
The pre-upgrade scan tool has not yet been run on this database SPContentDatabas
e Name=sts_content_tfs Parent=SPDatabaseServiceInstance. You must run the pre-up
grade scan tool before you can continue with the upgrade process. Run the tool f
rom the following path: C:\Program Files\Common Files\Microsoft Shared\Web Serve
r Extensions\12\bin\prescan.exe.
Unfortunately I have upgraded WSS from WSS2 to WSS3 on my source server, so I am unable to use prescan.exe.
Any other way to migrate the Sharepoint site from the old server to the new server?
Thanks
SQL Server: Connect to STS_Content_TFS
update Sites SET BitFlags = 262144
then follow steps here: http://msdn.microsoft.com/en-us/library/cc668750.aspx

Resources