Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7571999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T15:48:43+00:00 2026-05-30T15:48:43+00:00

We use fluentmigrator and it wants a long for the migration number. Normally I

  • 0

We use fluentmigrator and it wants a long for the migration number.

Normally I can just open the immedetiate window and type

System.DateTime.Now.ToString("yyyMMddhhmmss");

But sometimes it will say:

The expression cannot be evaluated while in design mode.

So I start debugging run the command again and get this error:

The expression cannot be evaluated while in run mode.

Edited to add

If I start debugging and hit pause and enter the command I get

Cannot evaluate expression because the current thread is in a sleep, wait, or join

If I start debugging hit a break point then it works but that is too many hoops to jump through and it has worked in the first scenario. It seems to build my project since if there were errors it wouldn’t execute.

This is in visual studio 2010 pro.

Bonus points if one can tell me how to do this as a class template or maybe a powershell type thing?

I’ve tried the answer in Immediate Window, "The expression cannot be evaluated…." and selecting the project doesn’t work. I don’t get the > in the immediate window and if i put it before the command i get

Command “…” is not valid.

Edited To Add
I created this gist to do what I wanted.

https://gist.github.com/9ad816c2b8e56b57ef79

basically a powershell command to create a c# template with some crap filled in.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T15:48:45+00:00Added an answer on May 30, 2026 at 3:48 pm

    Why not just use PowerShell:

    PS> [DateTime]::Now.ToString("yyyMMddhhmmss");
    20120228043351
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

use pthread_create to create limited number of threads running concurrently Successfully compile and run
Use the static modifier to declare a static member, which belongs to the type
Use case: You have 2-3 files displayed in your MacVim window(s). You press ctrl+Q
Use Selenium a lot, but wondering the folowing question Just a little bit curious,
Use default: <input type=radio name=restype value=resdef onfocus=document.getElementById('resupload').disabled = true; document.getElementById('resadres').disabled = true; checked=checked /><br
use strict; use warnings; open(FILE1, /cygdrive/c/cpros/mola.txt); my $line = <FILE1>; print $line; close(FILE1); open(FILE1,
use strict; use warnings; open(FILE1,/cygdrive/c/cpros/karthik/molk.txt); my $line = < FILE1 > ; print $line
use PHP and MySQL and want to use SELECT statement which date_post(datetime variable) start
use strict; use warnings; open(FILE4,cool.txt); open(FILE6,>./mool.txt); $line = <FILE4>; while ($line ne ) {
Use OPENXML to get dt element in MSSQL 2005. How can I get xmlns:dt

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.